DEV Community

loading...

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#.

Forem Open with the Forem app