Re: [Scheme-reports] Module-level BEGIN is not a BEGIN - please call it something else
Jussi Piitulainen 28 Apr 2011 07:06 UTC
John Cowan writes:
> Jussi Piitulainen scripsit:
>
> > Is there anything in the report about how imported modules are found?
> > Obviously (import (scheme io)) refers to a known module, but suppose I
> > had a module of my own. My present understanding is that this is left
> > intentionally unspecified in the small language.
>
> There is nothing in the report about it, and I would oppose measures to
> add it.
So you oppose saying in the report that the following should work in
the obvious way?
(module (party) ...)
(module (main)
(import (party)) ...)
Then top-level/REPL modules would have the same status as modules
stored elsewhere in some implementation-specific way. Fair enough.
I would be happier with an explicit statement: "Implementations should
provide an appropriate mapping from the names of imported modules to
the actual modules." Is this too much to add? It doesn't say that the
modules have to be files, just that they are expected to be found if
they are, indeed, there.
> > It would not be the right balance to specify top-level module
> > definitions in this report but leave the more important library
> > system out. Larger systems can provide both.
>
> I don't know what you mean here. R7RS modules are essentially R6RS
> libraries with a few less, and a few extra, bells and whistles. They
> have different names because they are technically incompatible, but
> there is a compatibility core: imports with optional inclusion,
> exclusion, renaming, and prefixing; exports with optional renaming;
> embedded code wrapped in BEGIN.
This is all good. Such modules can be used as code libraries if the
system has a way to find them when they are imported, and programmers
have a way to arrange their own modules to be so found by the system.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports