Re: Relative merits of Lisp-1 vs. Lisp-2?



JesusWaffle@xxxxxxxxx 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).

How about using a simple read-macro for this? Something along the lines
of:

(defun square-brace-reader (stream char)
(declare (ignore char))
`(funcall ,@(read-delimited-list #\] stream t)))

(set-macro-character #\[ #'square-brace-reader)

That will expand [foo bar] to (funcall foo bar), or [[(f x) y] z] to
(funcall (funcall (f x) y) z).

....because you still have the cognitive overhead of having to know when or when not to use brackets (which may or may not be relevant to you).


Pascal

--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/
.



Relevant Pages

  • Re: Relative merits of Lisp-1 vs. Lisp-2?
    ... programming style is somewhat more convenient with a Lisp-1. ... would have to say (funcall (funcall (f x) y) z). ... it more deeply) you might want to try out a Lisp-1 ... Perhaps it's only that I'm used to lisp-2, ...
    (comp.lang.lisp)
  • Re: Relative merits of Lisp-1 vs. Lisp-2?
    ... programming style is somewhat more convenient with a Lisp-1. ... would have to say (funcall (funcall (f x) y) z). ... it more deeply) you might want to try out a Lisp-1 ... Perhaps it's only that I'm used to lisp-2, ...
    (comp.lang.lisp)
  • Re: Relative merits of Lisp-1 vs. Lisp-2?
    ... programming style is somewhat more convenient with a Lisp-1. ... to say (funcall (funcall (f x) y) z). ... (defun square-brace-reader (stream char) ...
    (comp.lang.lisp)
  • Re: Relative merits of Lisp-1 vs. Lisp-2?
    ... (defun square-brace-reader (stream char) ... (funcall (funcall (f x) ... Hoan Ton-That has written a with-lisp1 macro which allows stuff like ... Ring the bells that still can ring. ...
    (comp.lang.lisp)
  • Re: One last question, was Re: Small Lisp to work with small operating system?
    ... Eli Gottlieb wrote: ... want to start with a lisp-2 notation, you'll need also funcall, but ... Assuming Lisp-1 evaluation, you sure can. ...
    (comp.lang.lisp)