This is the mail archive of the
mailing list for the Guile project.
Re: Polymorphism in Scheme (Re: records)
Jost Boekemeier <firstname.lastname@example.org.TU-Berlin.DE> writes:
> > 1. The current implementation doesn't use symbol properties.
> >From ice-9/syncase.scm:
> (for-each (lambda (symbol)
> (set-symbol-property! symbol 'primitive-syntax #t))
Ah, but that is only a trick which is used to prevent the syntax-case
system to overwrite *primitive* syntactic forms. That mechanism is
easy to adjust: you get the correct behaviour if you set the symbol
property of the same environment which provides the primitive
syntactic forms (standard let, if etc).
> > 2. The current module system has more than one top-level environment.
> It has first class variables but not first class top-level environments.
> An environment binds symbols to values (better: locations). The
> question "what's the value of symbol x" is no longer valid because
> the answer to the question would be another question: "in which
But since the current module system maps symbols to different
variables depending on *in which module* you are we can define the
variables as an implementation detail, replace the word `module' with
`environment', and, voila, there we are... :)
The new module system doesn't remove or add any significant
functionality. It removes unneeded cruft and improves performance,
> > > Fortunately this is the only problem I've encountered. All other
> > > modules work as before and needed no (or minor) modifications.
> > I'm sure we can adapt the syntax-case module to the new system.
> I think that it has to be re-written from scratch. :(
Nope. (Sure about that one.)