Follow

Is a macro essentially a function? I am writing a Lisp dialect, with first-class macros, and in my case the answer seems to be, yes.

Behind the scenes, the types are exactly the same, they are just called at different times. (Both take Lisp expressions as arguments; the fact that these are unevaluated, in the case of macros, does not make a difference for the implementation of the actual type.)

This does mean that (function? my-macro) returns true. Not sure if that's desirable.

Thoughts?

· · Web · 0 · 1 · 0
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!