Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Didier Verna <didier@xxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 11:39:55 +0200
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 ?
--
Didier Verna, didier@xxxxxxxxxxxxx, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier@xxxxxxxxxx
.
- Follow-Ups:
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Pascal Costanza
- 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
- Relative merits of Lisp-1 vs. Lisp-2?
- Prev by Date: Re: (let ((C call-with-current-continuation))
- Next by Date: Re: s-expression data language
- 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
|