[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" <mvanier@cs.caltech.edu>
To: <brlewis@alum.mit.edu>
Cc: <sperber@informatik.uni-tuebingen.de>; <ll1-discuss@ai.mit.edu>
Sent: Friday, August 15, 2003 14:30
Subject: Re: Vectors as functions


>
> > From: Bruce Lewis <brlewis@alum.mit.edu>
> > Date: 15 Aug 2003 14:10:11 -0400
> >
> > Michael Vanier <mvanier@cs.caltech.edu> 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
their
> > > values to a given value, like mapping set! over the list of names.
Not
> > > 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
that
> 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
schemers
> want to comment?
>
> I guess the bottom line is: how much freedom to mess around with the local
> environment is consistent with lexical scoping?
>
> Mike
>