Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cout
on April 26, 2023
|
parent
|
context
|
favorite
| on:
Ruby's switch statement is flexible
Ruby does not have a switch statement; it has a case expression (which can be used in a statement).
ape4
on April 26, 2023
[–]
That naming is rather maddening.
layer8
on April 26, 2023
|
parent
|
next
[–]
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.
mekster
on April 26, 2023
|
root
|
parent
|
next
[–]
"Switch" to this statement in "case" of this expression, seems quite easy to grasp.
calo_star
on April 26, 2023
|
parent
|
prev
[–]
It's the same in Haskell, Erlang and Elixir.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: