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: Phillip Lord
Subject: Re: Real-life examples of lexical binding in Emacs Lisp
Date: Fri, 29 May 2015 17:21:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.0.0.0 (gnu/linux)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Am 29.05.2015 um 11:30 schrieb Joost Kremers:
>> Marcin Borkowski wrote:
>>> (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.)
>> Yes, Emacs is a text editor, but I'd say the primary purpose of Elisp is
>> to *implement* that editor. The fact that Elisp has more facilities for
>> editing text than most other programming languages is just a consequence
>> of that.
>>
>> So presumably lexical binding was added to Elisp not so much because it
>> makes text editing easier, but because it makes implementing the text
>> editor easier.
>>
>>
>
> Would be great to see an example where implementing the text editor is easier
> that way.


dash-functional.el makes extensive use of lexical binding and would not
work without it. I've used it in my m-buffer package, in a small way. I
could have done without.

And, yes, it's mostly about closures (from the programmers POV). But
asking for examples of where it makes editing easier seems to not make
sense to me. Can you show me a real *text editing* problem that
quick-sort solves, like something that is easier done than with bubble
sort?

Phil




reply via email to

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