This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Module expressions (was Re: define-alias not being exported)
Jocelyn Paine wrote:
...
Much better is to see modules as primitives in an expression in a "Module
Algebra"...
One consequence is that we can have a module-level rename.
...
Your proposal is interesting, and I too am thinking about implementing a
new kind of language facility with Kawa (based on XML Schema/RDF Schema
and XQuery ideas rather than logic or algebra concepts though).
After reading it, it occurred to me that the way that Kawa/Ada/Simula et
al deal with the module-level renaming problem is with interfaces. And
Kawa's module scheme does support them. Presumably the define-alias
feature will enable the implementation of zero-cost method
mapping/renaming. I believe the mapping syntax you suggest can be
implemented with a macro using the existing module facility.
And even in the case where you don't anticipate the need for renaming
and use interfaces to start with, it is not difficult to refactor them
in for renaming.
jim