6 ms·
> Pattern matching should make the language less verbose, not more. In the most basic cases, yes. It can be used as a more polished switch statement. It's the
by bluetomcat 1y ago
> Pattern matching should make the language less verbose, not more.
In the most basic cases, yes. It can be used as a more polished switch statement.
It's the whole paradigm of "define an ad-hoc Enum here and there", encoding rigid semantic assumptions about a function's behaviour with ADTs, and pattern matching for control-flow. This feels like a very academic approach and modifying such code to alter its opinionated assumptions isn't funny.
- eru 1y agoHow is encoding all the assumptions and invariants badly in eg a bunch of booleans and nullable pointers any better?