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.
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)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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)