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: Pascal J. Bourguignon
Subject: Re: Real-life examples of lexical binding in Emacs Lisp
Date: Sun, 14 Jun 2015 13:31:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:

> Exactly.  What I'm curious is how lexical scoping might make some tasks
> *connected to editing* easier/more natural.


It depends what you mean by "editing".

Until a few decades ago, editing was performed using red pens, paper, 
scissors, glue.  Then, lexical scoping was totally useless.


Nowdays, editing is performed by software programs.

Writing programs is easier and more natural with lexical scoping, IN
GENERAL!

Therefore, it is easier and mode natural IN PARTICULAR, to write editing
programs.

Writing programs in general is not *connected to editing*.
But writing editor programs in particular is particularly *connected to
editing*, even if programming has nothing to do with editing at all,
ever.

Actually, the programming activity has never anything to do with the
application domain!



When programming a four legged robot running across fields and parkings,
the programmer DOES NOT run across fields and parkings, on his four. 

I repeat, this is very important: when programming a four legged robot
running across fields and parkings, the programmer DOES NOT run across
fields and parkings, on his four. 

No, what the programmer does, is sit on his ass, think, and type a
program into a computer, using a keyboard. 



Now with editing, there may be some understandable confusion, since the
programmer will actually use an editor to edit his program, notably when
writing an editing program.  But you must distinguish the editor being
used to write the program from the editor program being written!

For example, you could use ed to edit the emacs editor program.  The
fact that you will be happier and write a better emacs editor program
using lexical scoping has NOTHING to do with how the ed editor edits
your editor program!  Just like you don't run in the fields when you
write a robot that runs in the fields.

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


reply via email to

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