[R6RS] library syntax

dyb at cs.indiana.edu dyb at cs.indiana.edu
Wed Aug 16 17:22:55 EDT 2006

> I've got a tiny change request for the library syntax:
> dyb at cs.indiana.edu writes:
> >   (library <lib-name>
> >     (import <import-spec>*)
> >     (export <export-spec>*)
> >     <library body>)
> Could we swap the "import" and "export" forms?  Arguably, the exports
> is what I want to read first, whereas the "exports" are more of an
> implementation aspect, as is the body itself.

I think you mean "imports" in the marked case, right?

I prefer the order as given.  The export form is perhaps the more
interesting form, but it is also likely to be longer.  I suspect that the
import form will be no more than a few lines in most cases, and quite
often just one, but for large libraries, the export form could get pretty
long, burrying the import form.

I also think the import-export order is more intuitive.  The imports are
the raw materials, and the exports are produced from the imports.


More information about the R6RS mailing list