Shower thought: Smalltalk (and to some extent other OO languages) replace pattern matching with dynamic dispatch.
I miss pattern matching in Lisp dialects without a good implementation, but I haven't noticed its absence in Smalltalk.
miniblog.
Related Posts
I really like pattern matching in Rust, but I find myself using it less and less.
`if let` and `let ... else` require substantially less indentation, and I often use them for Option values.
I don't miss this syntactic sugar in OCaml though. Maybe it's just because OCaml has a 2 space indent, unlike Rust's 4 space indent?
Are there any languages that have both pattern matching and statement oriented syntax?
In principle these are orthogonal, but I'm struggling to think of a language with pattern matching that isn't expression oriented.
"If it compiles it probably works" is definitely more common in some languages.
What PL features make this more likely?
My current theory is that pattern matching on enums with exhaustiveness checking is the primary cause. Especially when null has been replaced with Option.