Why would you care about selecting the branch in compile time? We&#x27;re talking about language features semantically equivalent to pattern matching, and, turns out, there are none. As for the importance of the exhaustion check, see the <i>billion-dollar mistake</i>.<p>Your solution with type and value checks in an if ladder was called &quot;dynamic typing&quot; exactly for this reason - you select paths dynamically in the runtime without any static checks on soundness of this selection.