3 ms·
You choose to interpret a switch statement through an if statement, but that's arbitrary: the other way around is also possible (interpreting/rewriting an if-el
by nsajko 6y ago
You choose to interpret a switch statement through an if statement, but that's arbitrary: the other way around is also possible (interpreting/rewriting an if-else construction as switch statements).
- jfkebwjsbx 6y agoThe point of GP is that the match assumes an equality test and it does it against a single object too. There is no way in many languages to write an if using a match.