It's one of the reasons why I wish more languages had a generalized switch statement (i.e. one that accepted arbitrary code as conditions, not just constants compared to a single value), preferably with a way to (explicitly, preferably) code a fall-through.
It means that you cannot necessarily translate it into a jump table, true. But it means that you can write code much more concisely, on the flip side. And it remains slightly readable.
It's one of the reasons why I wish more languages had a generalized switch statement (i.e. one that accepted arbitrary code as conditions, not just constants compared to a single value), preferably with a way to (explicitly, preferably) code a fall-through.
It means that you cannot necessarily translate it into a jump table, true. But it means that you can write code much more concisely, on the flip side. And it remains slightly readable.