Re:Intro To Pattern Matching – Covers C# 9
by platz on Wednesday February 19, 2020 @02:58PM
(#22369416)
I'm not implying exhaustiveness is always necessary, I'm saying if you want feedback from the compiler to support a type-driven extend-refactor workflow that is commensurate with inheritance-based typechecking, as is one of the major arguments for inheritance and subclassing to work they way it does in a static language, then you need exhaustivess to deliver the guarantees and maintainability experience if pattern matching is to replace inheritance+sublassing. Dynlangs here do not apply.
Without exhaustiveness it might not be feasible for a statically types PL though, but I don't know nearly enough to even speculate on that.