4 ms·
Having looked up variants just now, I can definitely see how it would be useful. It seems (to me) to fall into the same category of macro-like things that enhan
by ohyes 10y ago
Having looked up variants just now, I can definitely see how it would be useful. It seems (to me) to fall into the same category of macro-like things that enhance the expressiveness of the language. I think the most important point is the idea of lifting the programming language into the problem domain. When you can do this in a clean way, the result is a very readable solution that you can reason about.
- AnimalMuppet 10y agoI think there's a difference, though. With ML (IIUC), you build a language on top of ML that is a set of functions (and the data structures they operate on) that make it easy to express the program. With Lisp macros, though, you change the syntax of Lisp. You take things that were not valid Lisp syntax, and you make them valid for your program. So ML "language building" is in terms of semantics, but in Lisp, it's both semantics and syntax. (Again, IIUC).