[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vectors as functions
The biggest problem with first-class environments ala MIT Scheme
is the introduction of new bindings at runtime. If you introduce a
new binding, the `lexical address' (frame and offset) of a variable
cannot be statically determined and you have to do a deep search
every time. It absolutely destroys any sort of compiler optimization.
If you went a tad further and allowed *syntactic* binding in
first-class environments, you'd be truly hosed.
----- Original Message -----
From: "Michael Vanier" <email@example.com>
Cc: <firstname.lastname@example.org>; <email@example.com>
Sent: Friday, August 15, 2003 14:30
Subject: Re: Vectors as functions
> > From: Bruce Lewis <firstname.lastname@example.org>
> > Date: 15 Aug 2003 14:10:11 -0400
> > Michael Vanier <email@example.com> writes:
> > > I'm thinking of situations where you might have a list of symbols
> > > representing names (or first-class names) and you might want to set
> > > values to a given value, like mapping set! over the list of names.
> > > having names as first-class entities makes that unduly hard.
> > If you're sure you want to do it this way, and not use a hash table to
> > deal with names at run time, then you probably want Common Lisp.
> How would you use a hash table to deal with names at run time?
> [To Mike Sperber] Does "set" in common lisp destroy lexical scoping? I'm
> not sure exactly what you were getting at, although I dimly understand
> there could be a problem.
> I feel like first-class environments a la MIT scheme are also relevant to
> this discussion, but I don't really know much about them. Any MIT
> want to comment?
> I guess the bottom line is: how much freedom to mess around with the local
> environment is consistent with lexical scoping?