News for hackers. Stuff that matters.
Re:The general value of typed functional programming lies in... by marcosdumay on Monday February 24, 2020 @04:43PM (#22408764)
A default case supreses the warning in Haskell too, there is no other option.

The real problems with C enums aren't about matching completion, they are that:

- There is no guarantee that a variable value is in the enum range;

- A C (or Java, or C#) enum is a very poor type and can not represent all the data that a Rust enum carries. Developers usually use them with union types to solve that problem, but then there aren't any warnings for most problems anymore.

There are no comments on this comment yet.