- Key Concept: Lazy Rebuilding means we only rebuild the diff and only when we need it as in LWP copy on write
Scala, F#, Ocaml Pattern Matching Type Inference Exhaustiveness Guarantees
First contender: Scala
In true keeping with a dynamic platform, Scala does not infer there is a problem until runtime.
Next contender: F#
F# improves over Scala by catching the problem at compile time.
In this simple example, what is missing may be obvious. More complex examples may be harder to infer.
Final contender: OCaml
OCaml catches the problem at compile time and indeed infers the missing match. This is a clear improvement over F#.