2 ms·
Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros.
by dgb23 4y ago
Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros.
- andsoitis 4y ago> Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros is there not a whole class of problems that are not trivial if you cannot control evaluation of forms / expressions? this is one of the things (non-reader) macros provide.
- sparkie 4y agoYou can still somewhat control evaluation with quote and/or list.
- a1369209993 4y ago> if you cannot control evaluation of forms / expressions Assuming quote works, you can do: (eval (macro-expand '( # rest of file goes here ))) which I think technically meets the standards for "trivial", albeit annoying. (Edit: Although it'd have to be eval-with-macro-expand if you want proper first-class macros.)
- dgb23 4y ago“Trivial” is the wrong word, but it’s fairly known/common to write an embedded interpreter. The line between interpreting and just plain programming is very blurry in a lisp.