DEV Community

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

Collapse
lukaszahradnik profile image
Lukáš Zahradník

Well I wouldn't commit your code, because it had inlined blocks

Collapse
jmdejager profile image
🐤🥇 Jasper de Jager Author

I'd really like the discussion to be about the switch(true) and not about the code in comments. The code posted gives a good idea about why he voted vomit. It is not the code up for discussion.

Thread Thread
siddharthshyniben profile image
Siddharth • Edited on

You're right. Switching true just adds a few extra lines and makes us momentarily think "is it a typo? Why would you switch true". At least I did when I first saw a switch(true)

Thread Thread
lukaszahradnik profile image
Lukáš Zahradník

I wanted to react to Siddhart's code and I don't see any reason why it shouldn't be up for discussion.

Thread Thread
jmdejager profile image
🐤🥇 Jasper de Jager Author

Ok, just seamed off topic to me because of the style of the answer I guess. You said I" wouldn't commit your code" that's why.

Collapse
siddharthshyniben profile image
Siddharth

I'm on mobile so I didn't really format anything

Thread Thread
jmdejager profile image
🐤🥇 Jasper de Jager Author

It was sufficient to make your point 😊 no worries.