[Top][All Lists]

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

Lexical binding -- do we really need it?

From: Kim F. Storm
Subject: Lexical binding -- do we really need it?
Date: 07 Dec 2001 13:45:49 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

As you might have noticed lately, I've had quite some concerns about
the way lexical binding is being added to emacs lisp.

I have *NOTHING* against lexical binding - actually I would have
appreciated if emacs lisp had used lexical binding (with whatever
tricks are necessary to facilitate dynamic binding when needed).
But emacs lisp uses dynamic binding, and a lot of code depends on it!

My main concern is that since the semantics of `let' depends on the
scope, (blindly) moving/copying code from a lexical binding scope to a
dynamic binding scope (or vice versa) may cause some really
hard-to-find problems.

Now, the argument I hear against this concern is that the code will
work identically in 99% of all cases - i.e. whether the scope is
lexical or dynamic binding.  Which is probably correct!

So why go through all the hazzle of adding lexical binding - just to
make a 1% difference ?  Sounds pretty academic to me!  

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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