[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 <drew.adams@oracle.com> 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,
> IMHO.
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!
- DynamicBindingVsLexicalBinding, Andreas Röhler, 2013/10/12
- Re: DynamicBindingVsLexicalBinding, Dmitry Gutov, 2013/10/12
- RE: DynamicBindingVsLexicalBinding, Drew Adams, 2013/10/12
- Re: DynamicBindingVsLexicalBinding, Andreas Röhler, 2013/10/13
- Re: DynamicBindingVsLexicalBinding, Kai Großjohann, 2013/10/14
- Re: DynamicBindingVsLexicalBinding, Phillip Lord, 2013/10/15
- Re: DynamicBindingVsLexicalBinding, Kai Großjohann, 2013/10/15
- Re: DynamicBindingVsLexicalBinding, Phillip Lord, 2013/10/16
- Message not available
- Re: DynamicBindingVsLexicalBinding, Barry Margolin, 2013/10/16
- Message not available
- Re: DynamicBindingVsLexicalBinding, Rustom Mody, 2013/10/14
Re: DynamicBindingVsLexicalBinding, Phillip Lord, 2013/10/14