Hacker News new | ask | show | jobs
by jimmyed 1647 days 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?

2 comments

It's much easier to write macros when you don't have to parse anything.
it 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"
That'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.