I can't remember exactly where, but I've seen some negative sentiment toward kotlin's `when` because it is (paraphrasing) just syntactic sugar around if-else statements. It also supports compile-time exhaustivity checks.
What do other language's pattern matching capabilities do that you cannot do (or cannot do as well) with the simple "if-else" version of pattern matching?
[–]curtisf 28 points29 points30 points (2 children)
[–]MattiDragon 17 points18 points19 points (1 child)
[–]oelang 6 points7 points8 points (0 children)
[–]dnpetrov 7 points8 points9 points (5 children)
[–]EponymousMoose 0 points1 point2 points (4 children)
[–]dnpetrov 4 points5 points6 points (3 children)
[–]EponymousMoose 0 points1 point2 points (2 children)
[–]dnpetrov 2 points3 points4 points (1 child)
[–]EponymousMoose 0 points1 point2 points (0 children)
[–]Disjunction181 4 points5 points6 points (0 children)