4 ms·
TFA gets pattern matching. The critical thing is that the compiler (or macro system) needs to check that you've checked all the alternatives.
by cryptonector 2y ago
TFA gets pattern matching.
The critical thing is that the compiler (or macro system) needs to check that you've checked all the alternatives.
- naasking 2y agoYes TFA is pretty close, but note that it's not just "structs + unions + enums" getting you "most of the benefits", which is what I was responding to. There's a buttload of macros hiding allocation and switch statements.