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



JesusWaffle@xxxxxxxxx writes:

How about using a simple read-macro ... that will expand [foo bar]
to (funcall foo bar), or [[(f x) y] z] to (funcall (funcall (f x) y)
z)

I switched to this syntax a while ago. It cured me of any and all
residual Lisp-1 envy. (If anything, such code tends to be even *more*
readable than equivalent Lisp-1 would be.) Strongly recommended.


I had an additional reader macro that would expand {x y : (f y x)}
to #'(lambda (x y) (f y x)). What do you think?

If you find yourself using the same parameter names in most or all of
your "small" lambdas, a possible alternative to reader syntax is name
capture. For example, with:

(defmacro /xy (&rest form)
`(lambda (x y) (declare (ignorable x y)) ,form))

your example condenses down to (/xy f y x)


--
Marcus Breiing
.