DEV Community

Discussion on: I've never become overly convinced that switch statements are that much cleaner than `if else if else if else if else`

Collapse
 
alanmbarr profile image
Alan Barr

I much prefer pattern matching like in F# to switch statements. Eevee did an interesting blog on the history of the switch statement. I dislike the fallthrough behavior and find it visually displeasing in a code base.

Collapse
 
renegadecoder94 profile image
Jeremy Grifski

Thanks for the article! That was a quality read. Gave me a more clear explanation of why I don’t really like switch statements. Haha