5 ms·
anything in here about exhaustiveness checking? In my mind that's half the value of pattern matching.
by thurn 7y ago
anything in here about exhaustiveness checking? In my mind that's half the value of pattern matching.
- SloopJon 7y agoFrom the Exhaustiveness and Usefulness section: "inspect can be declared [[strict]] for implementation-defined exhaustiveness and usefulness checking." "having a __: case makes any inspect statement exhaustive." "any case that comes after a __: case would be useless"
- jobstijl 7y agoWhy wouldn't they make it [[strict]] by default?
- atilaneves 7y agoBecause it's C++, and the defaults must suck (std::vector::at anyone?)