News for hackers. Stuff that matters.
Re:Show HN: A utility for running exhaustiveness checks on “... by Animats on Monday March 20, 2017 @04:10PM (#13917266)
This is an old argument. If a language allows a switch statement where no case being executed is an option, there's an opportunity for bugs. If a language doesn't allow that, some people bitch about it being too pedantic.

A strong argument for insisting on covering all the cases (possibly with an explicit default) is that someday, someone may add a new enum value, type, or whatever, and code that fans out on that value may invisibly become invalid.

There are no comments on this comment yet.