[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] ANN: first draft of R7RS small language available



On Sat, Apr 16, 2011 at 11:16 AM, Noah Lavine <noah.b.lavine@x> wrote:
>> Most importantly, we have added modules, allowing programmers to
>> share portable libraries with ease.  We hope implementors
>> consider the effort of supporting the new standard small compared
>> to that important benefit.  Keep in mind that nothing is
>> finalized yet, and at this stage we are seeking constructive
>> feedback.
>
> Congratulations! This is a great step forward for Scheme, especially
> the module system.

Thanks for the quick comments!

> I am unsure what forum you would like feedback in, so hope here will work well.
>
> There were only two things that struck me as odd - first, the (scheme
> process-context) module is quite dependent on a certain model of
> executing processes that might not be true everywhere. It would seem
> better to me if that were optional, so implementations could provide
> it if it made sense and not otherwise. (For instance, embedded Schemes
> might have no environment or command-line arguments. Scheme programs
> run from a GUI might have an environment but no command-line
> arguments.)

This is precisely the reason these procedures were put
in a separate module, because _all_ WG1 modules are
optional.

Likewise many embedded systems have no I/O, so
I/O operations are all in separate modules.

> Second, the module form requires everything in a module to be inside
> the s-expression defining the module, which seems non-ideal for people
> who have to keep track of their nesting level. (Of course a good
> editor will handle this for you, but it seems backwards to design a
> programming language assuming that an editor will make it easier to
> use.) This is unavoidable at a repl, but I think there should be a
> facility for modules defined in files to have an s-expression at the
> top defining the module which would be closed before the body of the
> module. Perhaps if the first s-expression in a file is a module, then
> the rest of the file could be an implicit (begin ...) form in the
> module definition.

This complaint is noted and was anticipated, but it's
very difficult for many implementations to support -
specifically those for which the module system is
implemented in terms of macros.

If you use `include' instead of `begin', keeping the
source in a separate file, you can remove the
additional nesting level.  This also has the advantage
that you can wrap existing R5RS code in a module
without modifying it, and makes it easier to automatically
translate an R7RS module definition into other
module systems, without losing the original
indentation and comments.

If you feel strongly about treating trailing expressions
as part of the module body, I recommend writing it
up as a SRFI and trying to get as many implementations
as possible to support it, at which point it could be
considered in future standards.

-- 
Alex

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports