DEV Community

Discussion on: ✔||🤢 Commit or Vomit | Switch(true)

Collapse
 
jackmellis profile image
Jack • Edited

Personally I prefer all-or-nothing for braces, I really don't like mixing styles. If any of my code has braces, I'd prefer all of my code to have braces. But this is totally off topic and probably a topic for another C/V poll!

Thread Thread
 
jmdejager profile image
🐤🥇 Jasper de Jager

I'll save it for another ✔️||🤢 good idea.
Just have to come up with a good example 😊 and not posting a new one every day is hard but I think this is going to be a weekly recurring item from now on 😎

Thread Thread
 
edave64 profile image
edave64

I personally like to drop the braces IF the condition is small and the statement ends control flow and logically can't have anything after, like return, throw, continue, break, etc.