4 ms·
Even in C++, they are good when you want to encapsulate a statement that may return from the enclosing function. Every time I write a parser or interpreter in C
by blt 11y ago
Even in C++, they are good when you want to encapsulate a statement that may return from the enclosing function. Every time I write a parser or interpreter in C++, I end up writing a macro like
#define EXPECT_TYPE(node, Type) if ((node)->type != Type) { return FAIL; }
and using it extensively.
- uxcn 11y agoAlso things like generating code at compile time, but a lot of people could argue it both ways.