"Clang can codegen a switch statement with lots of disjoint cases as a binary search" https://zneak.github.io/fcd/2017/02/19/divisions.html (impressive!)
miniblog.
Related Posts
When talking about a match or a switch statement, I've typically seen people talk about individual 'cases' or 'arms'.
TIL Zig uses 'prongs' instead!
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.
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.