My Paradox With The Switch Statement

Ever since high school, I have always been suspicious when it comes to the switch statement in programming. It is quite intuitive if you think about it, but in my opinion it has various limitations in some scenarios: it's error-prone by missing a break; clause here and there chaining cases isn't always intuitive to read, in addition to the break; thing different languages have different rules for switch - such as the allowed switch types for input variables (Java used to disallow strings at all), objects, and especially what could be put in each case There are a few more,… Continue Reading