3 ms·
> Macros cannot change Nim's syntax because there is no need for it — the syntax is flexible enough. Erm, what? How about letting the user decide that?
by jimmyed 5y ago
> Macros cannot change Nim's syntax because there is no need for it — the syntax is flexible enough.
Erm, what? How about letting the user decide that?
- xigoi 5y agoIt's much easier to write macros when you don't have to parse anything.
- shirleyquirk 5y agoit does come across as arrogant. A humbler way to put it would be "Macros cannot change Nim's syntax because they transform the AST after it has already been parsed"
- dom96 5y agoThat's not the reasoning though. Not allowing macros to change the syntax gives Nim programmers an anchor and reduces friction from needing to learn brand new syntax rules for any big DSLs.