Herb Sutter's CppCon talk "Extending and Simplifying C++: Thoughts on Pattern Matching using `is` and `as`"

Imperatorn johan_forsberg_86 at hotmail.com
Mon Nov 1 22:15:34 UTC 2021


On Monday, 1 November 2021 at 16:26:47 UTC, Ola Fosheim Grøstad 
wrote:
> On Monday, 1 November 2021 at 08:15:55 UTC, Araq wrote:
>> What? Pattern matching doesn't scale/nest well because you 
>> think it's like try-catch? That's major news to all C#, F#, 
>> ML, Ocaml, Rust, Swift, Elixir programmers...
>
> It scales, but how do you know if you remembered to test all 
> types? If you forgot one, you'll get a runtime-crash. So you 
> need something more powerful, something that can statically 
> verify that you cover all relevant types (like a formalization 
> of a set of types).

Note to those not familiar with it, this is frequently called 
exhaustiveness checking.


More information about the Digitalmars-d mailing list