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: Stefan Monnier
Subject: Re: Lexical binding -- do we really need it?
Date: Fri, 07 Dec 2001 10:32:07 -0500

> >  [Of course, I suppose you could suggest `ldefun'
> > &c., but I think that's simply too horrid for words, and indeed, it
> > would probably make the implementation _more_ complex...]
> Actually, I don't think there would be any issues if we *always* use
> lexical binding for function arguments!  And if there are some (must
> be less than 5), they are easily fixed (but hard to find :-)!

I know of a few cases where the arg uses dynamic binding.
I can't say if it would end up being more than 5, tho.

> Or why don't we take the full step ahead... and make your lexical-binding
> the standard binding for let (and defun).  To bind a variable dynamically,
> it has to be declared via defvar/defcustom or using a new `dlet' form.

Because the choice is between 100% backward compatible lexical scoping
or no lexical scoping at all: the benefits of lexical scoping do not
justify losing *any* backward compatibility.

And this is from someone who's a strong proponent of lexical scoping
because he finds closures invaluable.


        Stefan




reply via email to

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