News for hackers. Stuff that matters.
Re:Emacs Lisp Lambda Expressions Are Not Self-Evaluating by lisper on Friday February 23, 2018 @12:32PM (#16447787)
> Macro expansion can place a literal or generated lambda expression there instead of using FUNCALL at all.

Not quite. This, for example, does not work:

(defmacro foo () '(lambda (x) x))

((foo) 1)

A macro can expand into a form whose CAR is a literal lambda expression, but because there is always an equivalent LET form I can't think of a circumstance where this can do anything but obfuscate the code.

Personally, I think this is a flaw in the design of CL. Long ago I proposed an extension that would allow the CAR of a form to be a macro:

http://www.flownet.com/ron/lisp/combination-hook.lisp

I think it's cool for pedagogy because it lets you do things like directly define the Y combinator in CL without a ton of FUNCALLs. But it never caught on.

There are no comments on this comment yet.