3 ms·
Ocaml, F#, Rust, Kotlin (I believe), Haskell, etc It is a common feature in languages derives from the ML family[0]. [0]: https://en.wikipedia.org/wiki/ML_(pr
by nestorD 7y ago
Ocaml, F#, Rust, Kotlin (I believe), Haskell, etc
It is a common feature in languages derives from the ML family[0].
[0]: https://en.wikipedia.org/wiki/ML_(programming_language) https://en.wikipedia.org/wiki/ML_(programming_language)
- kod 7y agoKotlin doesn't have real pattern matching.
- lllr_finger 7y agoIt doesn't, but at least 'when' statements will be exhaustive when working with sealed classes - which is a breath of fresh air if you enjoy working with sum types and pattern matching.
- kod 7y agowhen expressions will be exhaustive, when statements will not. Needless distinctions like that make the fresh air a little less fresh...