5 ms·
Ruby does not have a switch statement; it has a case expression (which can be used in a statement).
by cout 3y ago
Ruby does not have a switch statement; it has a case expression (which can be used in a statement).
- ape4 3y agoThat naming is rather maddening.
- layer8 3y agoIt’s the same in SQL and Ada. “Case” is an abbreviation for “case distinction” here. “Switch” was never intuitive to me, because nothing gets switched.
- mekster 3y ago"Switch" to this statement in "case" of this expression, seems quite easy to grasp.
- calo_star 3y agoIt's the same in Haskell, Erlang and Elixir.