Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ruby does not have a switch statement; it has a case expression (which can be used in a statement).


That naming is rather maddening.


It’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.


"Switch" to this statement in "case" of this expression, seems quite easy to grasp.


It's the same in Haskell, Erlang and Elixir.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: