Hacker News new | ask | show | jobs
by pmarreck 3308 days ago
Nim's macros look harder to use, with a fairly custom DSL in the AST (instead of, say, a simple datastructure like a nested map). I don't think you can pattern-match on AST fragments, either, like you can in Elixir.

Scala macros cannot change its syntax, Elixir macros can I believe (to some extent).

1 comments

The AST of Nim is a simple tree, the only thing is that the nodes of this tree are tagged with a kind that represents the kind of syntactic element, since the language is not homoiconic