[r6rs-discuss] [Formal] Add a multi-file library example
> On Sun, Nov 12, 2006 at 11:09:55PM -0500, MichaelL_at_frogware.com wrote:
> > Imagine wrapping a large package like SSAX in a library. The library
> > form might look something like this:
> >
> > (library (ssax (5 0))
> > (export read-xml write-xml ...)
> > (import r6rs)
> > ...)
>
> Assuming read-xml and write-xml are libraries in the SSAX
> superpackage, I would prefer
>
> (library (ssax (5 0))
> (export (read-xml 5 0) (write-xml 5 0) ...)
> (import r6rs)
> ...)
read-xml and write-xml were supposed to be examples of procedures exported
by the ssax library. In 5.91 libraries can't export libraries. Indeed,
library names aren't even identifiers so it would be a little tricky to
add that ability down the road. For example, how would "prefix" or
"rename" work when importing a compound name? (I submitted a separate
comment on that.)
Btw, some Schemes (like Chez) do support libraries-exporting-libraries (in
Chez they're called modules), so it's both a reasonable and useful
feature.
> Hopefully I've both explained this right and understood the 5.91
> library specification correctly.
I have the same hope. :-)
Received on Mon Nov 13 2006 - 12:32:39 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:00 UTC