On Wed, 14 Oct 2009 20:33:54 -0400, Derick Eddington
<[email protected]> wrote:
> However, just to mention it, there is the issue that the
> `(import (thing base))' and the `(define import 'something-else)' are in
> the same definition context in that order. If your proposal has R6RS
> semantics for bodies, then it will disallow "defining identifiers which
> may have already affected the meaning of undeferred portions of a body",
> which in this case is the definition of an `import' after the use of a
> different `import'. If your proposal does not have such R6RS semantics,
> then I imagine it should handle this issue however it would handle such
> issue in a lambda body.
The R6RS current disallows multiple definitions of bindings in a single
library. What I propose will use roughly the same result. Actually, we
could remove the phasing semantics from R6RS Libraries and replace them
with a META keyword, which would allow some stuff to happen, but I haven't
explored that. Basically, if you try to define two things, one which gets
bound by the IMPORT specifier, and then try to rebind it using a DEFINE,
this is an error.
>> One of the main points of my proposal is that the Library system isn't
>> its
>> own "description" language that exists as wrapping all Scheme code; it
>> *is* Scheme code. In order to evaluate Scheme code, one must have an
>> environment defined already. [...]
>>
>> [...] Sounds like a win to me. [...]
>
> Yeah, it sounds promising. I hope it gets the expert attention needed
> to fully explore it.
I see really one big argument against it at this moment: most module
systems in play today are not syntactic. At least, the big players don't
have them. The question is, should we move them to syntactic, knowing that
this could requiring more changing of the underlying system, if it is the
*right* solution to modules, or should we make this optional?
The other issue is solving the packaging and description language problem.
We could do it through additional syntax, and have some sets of standards
on that, but I am more inclined to take an approach like Descot, which has
a separate meta-data language, written in some extensible language itself
(RDF, in this case), and can be used to generate any module form you want.
That way, modules can focus on being a means of Scheme code abstraction in
Scheme, and the description, packaging framework can exist independent of
it. The two could be tied together, but they don't have to be.
When I get a moment, I intend to clarify these ideas with a practical
implementation of this using Descot.
Aaron W. Hsu
--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss