Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Pascal Costanza <pc@xxxxxxxxx>
- Date: Wed, 31 May 2006 12:34:24 +0200
Didier Verna wrote:
Pascal Costanza wrote:
I mostly agree with your assessment. But note that a functional programming
style is somewhat more convenient with a Lisp-1. It's easier to express
things like (((f x) y) z) whereas in a Lisp-2 you would have to say (funcall
(funcall (f x) y) z). So if you have a strong preference for functional
programming (or would like to explore it more deeply) you might want to try
out a Lisp-1 (i.e., Scheme).
Maybe I'm missing something but I don't see what this (I mean the need
for funcall) has to do with being a Lisp-2 at all. Consider
(defun make-adder (n)
(lambda (x) (+ n x)))
((make-adder 10) 3)
I never understood why Common-Lisp doesn't like that. Knowing that this
expression must be a function call, we expect that the evaluation of the first
object in the list, (make-adder 10) returns a function, which it does. In
turn, (make-adder 10) being a function call, we expect that make-adder
evaluates to a function (that's the only place where there is a Lisp-2 thing),
which it does. What's wrong with that ?
((make-adder 10) 3) and (let ((x (make-adder 10))) (x 3)) would not be the same.
Pascal
--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/
.
- Follow-Ups:
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Didier Verna
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- References:
- Relative merits of Lisp-1 vs. Lisp-2?
- From: JesusWaffle
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Pascal Costanza
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Didier Verna
- Relative merits of Lisp-1 vs. Lisp-2?
- Prev by Date: Re: Slime and Trace
- Next by Date: Re: Lisp And Visual Studio.net(2003)
- Previous by thread: Re: Relative merits of Lisp-1 vs. Lisp-2?
- Next by thread: Re: Relative merits of Lisp-1 vs. Lisp-2?
- Index(es):
Relevant Pages
|