News for hackers. Stuff that matters.
Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by aidenn0 on Wednesday March 20, 2019 @12:06PM (#19443559)
Considering the username of the person you are replying to, you might consider that they are very likely to have implemented macros in a lisp.

In common lisp, defining a macro defines a function that receives as its arguments the unevaluated forms passed to it plus (optionally) the lexical environment. This part is indeed "essentially a lambda without argument evaluation."

The magic isn't there, the magic is in the interpretation of the value it returns. It can return any arbitrary lisp forms. This allows macros to do far more than just delay evaluation. Pretty much anything that involves code walking is not possible with lambdas, for example. Some setf expanders would be impossible with lambdas as well.

There are no comments on this comment yet.