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: Sat, 30 May 2015 18:54:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Rusi <rustompmody@gmail.com> writes:

> On Saturday, May 30, 2015 at 9:27:25 PM UTC+5:30, Emanuel Berg wrote:
>> Contrary to this situation, Lisp is right in front of
>> us. There is no modelling in the world that will
>> enhance our understanding of Lisp more than we write,
>> say, 50 lines of it every day. And, doing that, one
>> might actually do something useful while at it!
>
> Some very eminent Lispers perceive Lisp rather differently:
>
> | Lisp...  McCarthy did as a theoretical exercise-- an effort to
> define a more | convenient alternative to the Turing Machine. Lisp was
> not really designed to | be a programming language
>
> From http://www.paulgraham.com/icad.html

You have to understand what Paul Graham is saying.

But historically, John McCarthy definitely was designing a programming
language, not just a theorical exercise.  One perhaps may be mislead by
the way "scientific" "papers" are written, including mere AI Memos.  But
that's just the "academic" style.  John McCarthy definitely was
designing a programming language, and this can be shown by the complains
he had and requirements he made of the languages he had to use before he
invented LISP, ie. Fortran and Algol.  He wanted a ternary IF from
Fortran (which was rejected at the time), he wanted a COND form from
Algol (which was also rejected).  Seeing that he couldn't have his ideas
integrated in the existing programming languages, he set to define his
own.

But indeed, John McCarthy expected to refine a M-expression syntax for
his lisp programming language; the S-expression syntax was used only for
data, but since he defined an eval function working on code represented
as data, and since his student Bertrand Russel implemented this eval
function and realized that nothing more was needed to evaluate code
expressed as data S-expressions, lisp in its S-expression form took off
and flew out of the hands of John McCarthy.

So indeed, the lisp we have with S-expressions is not the lisp John
McCarthy wanted to design, but it is still definitely a programming
language that John McCarthy wanted to and did define, for perfectly
practical purposes at the AILab.


And if it were a theorical exercice, John McCarthy wouldn't have missed
the problem of defining lambda without closures.

-- 
__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]