This is nice if your goal is to come up with convoluted ways to say the same thing in fewer characters (ignoring the code that you had to add to enable the shorter version in the first place).
With your example, both a switch and simple if-else chains would be perfectly readable and also easy to write.
With your example, both a switch and simple if-else chains would be perfectly readable and also easy to write.