emacs-devel
[Top][All Lists]
Advanced

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

Re: Lexical binding -- do we really need it?


From: Miles Bader
Subject: Re: Lexical binding -- do we really need it?
Date: 07 Dec 2001 22:32:36 +0900

address@hidden (Kim F. Storm) writes:
> So why go through all the hazzle of adding lexical binding - just to
> make a 1% difference ?  Sounds pretty academic to me!  

_I_ want it because I want to be able to use let-binding freely, without
the overhead of dynamic binding (it's not horribly large, but it does
exist, and for code that must be very fast, it can make a difference).
Lexical binding is in many cases basically free (e.g., has no additional
cost over not binding at all).  As it is, I always end up thinking a
little before I binding something -- `do I really need to make this
binding?' -- which is stupid.

It also gives the compiler greater latitude to do optimizations that are
currently impossible because a binding _might_ escape (even though every
human programmer knows it won't, or at least shouldn't).

[Of course, what some people want is closures; strictly speaking, they
are independent of lexical binding, but are not possible to implement
given the current shallow-binding implementation of dynamic binding in
emacs.]

You might try reading the archives of this list, BTW, where all this has
been discussed before -- indeed, I rather wish you had raised these
objections then, _before_ I started implementing all this!!!

Please keep in mind that my implementation is very simple (I've already
passed it by Richard), and as far as I can tell, the only `hazzle' is in
your mind...

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]