[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vectors as functions
That makes sense, but I assume that the loss of optimization capability is
only for procedures that actually add new bindings at runtime, right?
Given that this is probably a fairly rare thing to want to do, what's the
big deal? It's just a costly operation that you can choose to do or not to
do (like using continuations <duck>). That doesn't mean it shouldn't be
What do you mean by syntactic binding in first-class environments? Do you
mean defining macros in first-class environments? Yes, I can see that that
would get pretty darned messy.
> From: "Joe Marshall" <firstname.lastname@example.org>
> Date: Fri, 15 Aug 2003 15:29:30 -0400
> 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>
> To: <firstname.lastname@example.org>
> Cc: <email@example.com>; <firstname.lastname@example.org>
> Sent: Friday, August 15, 2003 14:30
> Subject: Re: Vectors as functions
> > > From: Bruce Lewis <email@example.com>
> > > Date: 15 Aug 2003 14:10:11 -0400
> > >
> > > Michael Vanier <firstname.lastname@example.org> 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?
> > Mike