DEV Community

loading...

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
jrop profile image
Jonathan Apodaca

Pattern matching for the win! That aside, switch statements are more easily readable than long if-else-chains when comparing against constants. As always, readability is subjective.

Forem Open with the Forem app