News for hackers. Stuff that matters.
Re:The general value of typed functional programming lies in... by hellofunk on Monday February 24, 2020 @01:02PM (#22406487)
Many people have their compilers set to enforce these things, and many of us go a step further and make our compiler warnings into errors so it’s impossible to build a program with these errors. That’s very commonplace, and C++ does it just fine. Missing cases in enums and at least 100 other very common matters can be checked at compile time in C++, the only difference is that it’s not the default as it is in some other languages.
Re:The general value of typed functional programming lies in... by LessDmesg on Monday February 24, 2020 @01:42PM (#22406988)
Enums are no substitution for sum types, though.
Re:The general value of typed functional programming lies in... by hellofunk on Monday February 24, 2020 @03:08PM (#22407894)
The comment I was responding to was not about the functionality of a sum type, but rather the compilation errors from leaving out a case. Those are two different matters.