DEV Community

Discussion on: Why switch is better than if-else

Collapse
 
johannesvollmer profile image
Johannes Vollmer

Well, if you try to use a c-style switch statement that's definitely a problem. That's why I suggest you to look into the Rust way of switch: matching. It has all the good parts of switch but not the bad ones.