Pattern matching encodes data shape in the type system, eliminating brittle imperative branching and improving correctness in domain-driven systems like digital commerce.
Experiment: making TypeScript immutable-by-default
TypeScript cannot be made immutable-by-default purely through its type system; arrays and Records can be made immutable, but regular objects remain problematic.