help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Real-life examples of lexical binding in Emacs Lisp


From: Emanuel Berg
Subject: Re: Real-life examples of lexical binding in Emacs Lisp
Date: Fri, 29 May 2015 20:43:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:

> I googled a bit, and could not find /real-world/
> examples of using lexical binding and its advantages
> /in Emacs Lisp/. I understand that it's a nice thing
> to be able to create closures, and that lexical
> binding is in general faster than dynamic binding
> (which is a bonus in itself), but could anyone show
> me a real /text editing/ problem that lexical
> binding solves, like something that is easier done
> with l.b. than with d.b.?

Here, Stefan Monnier will correct me if I'm wrong:

Lexical scope is better for general purposes and the
Joe Elisp Hacker, and this is illustrated by the fact
that >99% of the Emacs code that is dynamically scoped
would work just as well with lexical-binding.

> (Examples of general-purpose programming problems
> made easier with l.b. are more or less obvious/easy
> to find, but Emacs is a text editor, after all, and
> this is its primary area.)

There is no contradiction between text and
programming! And there is no hierarchy what is Emacs
primary, secondary area and so on. From programming,
Gnus, ERC, and Emacs-w3m, to writing love novels - it
is all on the same level.

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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