|
|
|
|
|
by raganwald
6588 days ago
|
|
I never use Ruby's case or switch or whatever-it's-called. I could make up some mumbo-jumbo about case being a code smell and that it should actually be refactored to a method dispatch over polymorphic objects, but the truth is that I have no idea why I don't write case statements, I just don't. |
|
Of course if I had to write that kind of construction often I'd probably learn the syntax of the case statement, but in the kind of work I do it hardly ever actually comes up.