|
|
|
|
|
by sparkie
385 days ago
|
|
That's a different meaning of first-class from Strachey's definition of a first-class citizen[1] - ie, one that can be passed as an argument, returned from a function, or assigned to a variable. Syntactic macros are still second-class, like Lisp macros, but an improvement over text-replacement style macros. For something macro-like which is first-class, there are fexprs[2] and operatives (from Kernel[3]) - these receive their operands verbatim, like macros, so they don't require quotation if we want to suppress evaluation. fexprs/Operatives can be passed around like any other value at runtime. [1]:https://en.wikipedia.org/wiki/First-class_citizen [2]:https://en.wikipedia.org/wiki/Fexpr [3]:https://web.cs.wpi.edu/~jshutt/kernel.html |
|
Thank you for the clarification and the additional information, I think having macros as first-class objects is a cool (but separate) idea.