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.
miniblog.
Related Posts
I've been using "Expected Int, but got String" for my type error messages, but I've been wondering if I could do better.
"Expected Int here, but this value has type String" or "This expression requires Int, but the value is String".
Do you have a favourite?
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position.
Are there any advantages to having a statement/expression separate in a new programming language?
I understand that it makes sense for existing languages, but "everything is an expression" seems to be increasingly popular.