3 ms·
Yes, it's the same in nim. For instance, see this example which defines a compact definition syntax that is certainly not valid vanilla nim: https://peterme.n
by TylerE 7y ago
Yes, it's the same in nim.
For instance, see this example which defines a compact definition syntax that is certainly not valid vanilla nim:
https://peterme.net/metaprogramming-and-read-and-maintainability-in-nim.html https://peterme.net/metaprogramming-and-read-and-maintainabi...
Refer to lines 63-88 of the large final example.
- ori_b 7y agoAnd if I wanted to make 'for' into a valid variable name, or change the tokens for specifying numbers, for example, how would I go about doing that?
- junke 7y agoOk this is nice but you this would be rougly the same in Lisp, apart from AST constructors ("newIdentNode()",...), which would simply be backquote/unquote. Plus you have to write enumInfo[0], enumInfo[1] instead of pattern matching.