[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

first-class names [was Re: Vectors as functions]



>>>>>> "mike" == mike  <mike@newhall.net> writes:
>
> mike>     It seems that one way to look at this is to consider " 'foo " to
> be a
> mike> degenerate case of literal code, with the same binding problems.  If
> mike> you could store the symbol "foo" along with the environment in
> effect
> mike> at the time you stored it, a la (lambda), wouldn't that allow
> mike> optimization and analysis and all that good stuff?
>
> Sure, that's exactly what LAMBDA does.  Just do
>
> (let ((foo 23))
>   (let ((set-foo (lambda (x) (set! foo x))))
>     ...))
>
> Cheers =8-} Mike Friede

    I guess the real question is can this be turned into something that
provides some [more] of the benefits of the canonical implementation
of first-class names without all the costs...