top | item 24791378

(no title)

pfarnsworth | 5 years ago

One of the first nasty bugs I had to work on when I first came to Silicon Valley was stack corruption from a fall through of a switch statement. After something like that, you learn pretty quick to always put break lines at the end of the switch before anything else.

discuss

order

cjfd|5 years ago

And then one puts in one too many in a case where fall through actually was the idea....

panda88888|5 years ago

I try to be explicit and place a comment saying fall through if it is the intended behavior. This helps to inform the next person reading the code.