3 ms·
Algebraic data types are everywhere in Nim code: they are just called case objects(and they do have some differences compared to e.g. haskell, but often they ar
by alehander42 8y ago
Algebraic data types are everywhere in Nim code: they are just called case objects(and they do have some differences compared to e.g. haskell, but often they are used in a similar way)
There is also https://github.com/krux02/ast-pattern-matching https://github.com/krux02/ast-pattern-matching (optimized for usage in macros / metaprogramming)
Yes: they all use the macro system, but this is a good thin IMO: it's better to leave the core language simpler and to build such abstractions on top of it.