[Top][All Lists]

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

Re: DynamicBindingVsLexicalBinding

From: Phillip Lord
Subject: Re: DynamicBindingVsLexicalBinding
Date: Mon, 14 Oct 2013 12:21:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Drew Adams <address@hidden> writes:
>> with dynamic binding you can do other cool things (you can let-bind
>> a variable, then call a function which calls...and the innermost
>> function will reference the value you just bound -- so you can pass
>> parameters around without actually having to mention them on every
>> function call).
> Yes.  Which is especially important for a heavily interactive and
> customizable program such as Emacs.  Emacs users extend and otherwise
> modify or adapt the source code, and they do so sometimes on the fly
> and interactively.

I don't think this is an advantage of dynamic binding; it's just an
advantage of having lots of configuration options. 

I've certainly used the feature that Kai likes, but mostly it has been
to hack around code which I do not control or do not want to change.
Nowadays, in general, I would want to advice code instead.

>> So each of the styles has their own advantage.
> Definitely.  Those who imagine that a lexical-only approach, a la
> Scheme, would be a better way to go for Emacs are on the wrong track,

I am not convinced that having two complete separate models of variable
binding is a great idea. This forces Emacs programmers to have a good
understanding of dynamic and lexical scope. If Emacs is to move more
toward lexical scope, then supporting both should be considered only to
be a stepping stone.

> Now if only Emacs Lisp had good namespace control, like Common-Lisp
> packages...

A good point, but an independent one I think!

reply via email to

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