| ▲ | flowerbreeze an hour ago | |
I think being able to define additional rules in a language is a reasonable feature and sometimes would make life a whole lot easier, but I think when implemented through text macros rather than rewriting the underlying program graph along with accounting for all the constraints, that causes most issues. Program graph rewriting is of course more complex, but can be better defined with regards to acceptable inputs and more defensive as opposed to letting the next step of compiler or interpreter handle it. The other problem is that most IDEs don't offer an expand macro (or similar) option for the rewritten parts (or I haven't seen them doing that), so observing what the final code looks like requires additional steps. In some ways its similar to functions, but most languages have functions that have a well defined input/output structure whereas macros can do some unexpected things depending on the inputs. | ||
| ▲ | classified an hour ago | parent [-] | |
> most IDEs don't offer an expand macro option Insert mandatory observation here that LISP was there decades ago. I don't know about SLIME in Emacs, but if you use SLIMV in Vim, you have a keyboard shortcut for MACROEXPAND already there. | ||