Ray Dillinger scripsit:

> A module system that includes detailed descriptions of 
> 
>   How to define portable modules in scheme,  

Don't import any modules except "thing-one".  :-)

>   How to load user-defined portable modules (typically kept in the
>   same directory as the rest of the project).
> 
>   How to load implementation-defined portable modules (scheme modules
>   provided by the implementor, presumably in a place known to the
>   installation/configuration/registry database).

[text moved down]

>   How to load "implementation defined non-portable" modules.
> 
>   How to load "user-defined non-portable" modules (modules provided
>   by the user which use the implementation-defined means of creating
>   non-portable modules to do things.)

I think these are significant concerns, and can be addressed by adding
SRFI 55 to the mix.  Currently, we can import a module knowing its name,
but we cannot *load* a module knowing its name, because "load" accepts
native pathnames (or at any rate, strings, which are almost always
interpreted as native pathnames) only.

SRFI 55's "require-extension", however, accepts a sequence of module
names, each of which is a list, exactly what is wanted for R6RS libraries.
In SRFI 55, the non-first elements of the list need not be identifiers:
thus (require-extension (srfi 1)) specifies SRFI 1 as required.

Chicken implements SRFI 55 (no surprise, since they have the same authors)
and interprets it as load plus import.  This places the burden of which
file(s) to load on the implementation, where it should be; the programmer
needs to know only the module name.

I haven't proposed SRFI 55 before because only Gauche, Chicken, Guile,
SISC, STklos, and SigScheme implement it.

Does that satisfy your concerns?

>   How to manage the namespace. 

Can you clarify this?

>   Mention that implementations are strongly encouraged to provide
>   and document (unspecified) ways to define "non-portable" modules
>   that do things not accessible in pure scheme (such as bitgroveling,
>   file and character I/O, access the binary format in which scheme's
>   data is held at runtime, operating sytem calls, etc).

Sounds good to me.

-- 
When I'm stuck in something boring              John Cowan
where reading would be impossible or            (who loves Asimov too)
rude, I often set up math problems for          [email protected]
myself and solve them as a way to pass          http://www.ccil.org/~cowan
the time.      --John Jenkins

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to