3 ms·
Maybe I'm missing something, but isn't Lisp the original version of this?
by Munksgaard 2y ago
Maybe I'm missing something, but isn't Lisp the original version of this?
- warpspin 2y agoWell, Lisp macros are mentioned in a footnote at least, and yes, maybe even the oldest version of this idea.
- kragen 2y agolisp macros are probably newer than forth, but i don't know that they're newer than the words [ and ] in forth. but lisp did permit arbitrary compile-time computation from the beginning, i believe
- lispm 2y agoFEXPRs existed around 1960. Macros slightly later. MIT AI Memo 57, Timothy P. Hart, MACRO Definitions for LISP, October 1963 http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/ai/aim/AIM-057.pdf http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/ai/aim/...
- kragen 2y agoaha, thanks! that's definitely older than forth
- TeMPOraL 2y agoPretty much. And not just via macros. Lisp languages tend to blend together "runtime" with "load time", and in case of compiled languages, also "compile time". You can write code executing during any one, or any combination of, these phases. You can reuse code between those phases. You can interleave them at will - e.g. by loading more code at runtime, or invoking a compiler, etc.
- kragen 2y agoprobably so, yes, but forth would be #2
- JonChesterfield 2y agoLisp was also the one that taught us that interpreters and compilers for nominally the same language really need to have consistent semantics, e.g. don't lexically scope in the compiler and dynamically scope in the interpreter.