4 ms·
Not sure I would call it "trivial." You just trade your segfault (or NullPointerException) for a pattern match error. Although that little bit of static typing
by chancho 17y ago
Not sure I would call it "trivial." You just trade your segfault (or NullPointerException) for a pattern match error.
Although that little bit of static typing would probably have dealt with the vast majority of expensive null-pointer bugs.
- kscaldef 17y agoThe pattern match error can be detected at compile time. The NPE is not.
- Niten 17y agoWell, trivial in relation to a company rebuilding its product on a new programming language or paradigm.
- camccann 17y agoNot if you enable compiler errors for inexhaustive matches. Are there any compilers for mainstream languages that can flag all possible segfault/NPE locations as errors?
- wlievens 17y agoThat's probably an intractable problem.