2 ms·
I was super-surprised when I used rust macros (specifically macro rules) about how lispy it was. There was an aha-moment when I realised that it was token base
by yw3410 5y ago
I was super-surprised when I used rust macros (specifically macro rules) about how lispy it was.
There was an aha-moment when I realised that it was token based and not AST based like some other macro systems I've worked with in some other languages.
Case in point is how to express varargs in macro rules which is expressed roughly like a comma followed by an expression repeated n times. Super nice.