Re:Ruby's Switch Statement Is More Flexible Than You Thought
by cout on Wednesday April 26, 2023 @11:22AM
(#35715147)
Ruby does not have a switch statement; it has a case expression (which can be used in a statement).
[ Parent
| on HN ]
Re:Ruby's Switch Statement Is More Flexible Than You Thought
by ape4 on Wednesday April 26, 2023 @11:31AM
(#35715329)
That naming is rather maddening.
Re:Ruby's Switch Statement Is More Flexible Than You Thought
by layer8 on Wednesday April 26, 2023 @12:20PM
(#35716177)
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.