Mikael More writes:
Problem: The Library syntax requires all library content to be put within the define-library form (there in a begin or include*). This means that to define a library, the programmer is reasonably required to either put all library code in a define-library and also indent accordingly, or maintain two files per library.
Rationale: An incremental development situation makes use of any convenience as to increase the speed of experimentation. In such a situation, creating two files per library would seem completely unjustified. Also, in general Scheme development, Scheme can be made to work reliably without need for separation of a library into anything like a separate header and code file. By this reason, I will not consider the two files per library use-case further here but focus on the other point:
I find a requirement that >99% of the Scheme code in existence needing to be made within a particular form and indented accordingly peculiar indeed. The way Scheme code traditionally is divided into files works so well that I believe a specific define-library form in addition to this to contain the library, to be superfluous. And, Scheme's traditional forms provide sufficient structure to perform indentation based on.
Suggestion: Please find a way so that the library body in the library definition file is at the top level.
One way would be to allow a variant of define-library of 5.6.1. to be used as (define-library (library name)) and then provide the library declarations subsequent to this one, with the exception of the begin library declaration whose contents are inlined by themselves.
I'd guess many times the Scheme file's filename would provide the information otherwise provided by (define-library (library name)) , so that that line could be made optional generally also.
In response to the last point only: Both Chibi and most R6RS Schemes use the approach of having a library-path to specify the directories which are the roots of the library system. Without an explicit name associated with the library, changing the root would implicitly change the name.