DEV Community

Discussion on: Reverse switch?

Collapse
 
ssimontis profile image
Scott Simontis

I think the switch statement is more elegant and readable, although I feel the most elegant solution is pattern matching, which you see in functional languages like OCaml or F#.