[R6RS] libraries

Michael Sperber sperber
Mon Dec 12 03:12:39 EST 2005


dyb at cs.indiana.edu writes:

> So, while I think I can probably implement your modified semantics (both
> set! and lhs id must originate in the exporting module), it's only one
> of several possible interpretations of "settable only by the exporting
> module", and I believe it will lead to confusion.  Your semantics
> also falls short of supporting program analysis in the way that true
> external immutability would, negating one of the potential benefits
> of immutability.
>
> I'm happy to compromise on the mutability issue and make module exports
> immutable if all exports (direct or indirect) are totally immutable,
> so that we avoid confusion and support program analysis.  Of course,
> you may not need me to be happy if I end up in the minority.

I believe two things got slightly confused here: You asked me what I
meant when I used the term "immutability," but that doesn't mean it's
the only thing I'd agree to.  Previously, I had thought the term was
clear, but you reminded me that it's in fact highly ambiguous, and I'm
happy the issue got illuminated---thanks for that!

Sure, the kind of immutability I described disables *some* program
analysis, but it sure doesn't disable *all* program analysis that
allows optimization.  There's a whole spectrum here, leading all the
way up to SML, where all bindings are immutable, so it doesn't seem
clear that program analysis should trump us to any particular place in
the middle of that spectrum.

To be clear: Making all exports immutable would also be agreeable to
me.  (Also, I'd *like* you to be happier than you are, even if I don't
*need* you to be :-) )

Rationale-wise, remember that we're discussing a library standard
rather than a module system.  While I'd agree with your argument in
favor of separating out immutability from the module system the
context of a Chez-style module system (...), I don't agree with it in
this context, where we're prescribing policy just as much as we're
providing means for abstraction, and possibly more.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla


More information about the R6RS mailing list