Hey there, Happy German Unity Day (October 3rd) to everybody.
I’ve written a SIP draft on how to improve pattern matching to make it more practical in code bases compiled with the strictEquality feature.
I’ve worked on multiple projects where I would have liked to enable strictEquality for the improved type safety that it provides, but without exception, this failed due to compilation errors for basic ADT pattern matching.
It’s time to fix it and I welcome any constructive feedback.
Thanks @Sporarum, I’ve added a paragraph in the Alternatives section explaining the pros and cons of this approach. tldr: benefits of the type check behaviour are marginal, backward compat matters more. But please feel free to point out any benefits (or drawbacks) that I may have missed.