>> Is that smart to do? Would you pros do that?
In some situations, yes. You have to be very careful, though, because it is an easy thing to miss. You should make it obvious that you purposefully didn't put in the break, and you should make it obvious that the code under the next case counts for multiple cases. For example, notice how the comments help indicate what you are doing so that when you or somebody else comes back to maintain or update the code, there is less chance of confusion.If you can do something in a manner that is more clear than the above, you should choose that version instead. Even with the comments I don't like the above code.Code:
// fall through on purpose!
// case 4: