Andrew's Blog     All posts     Feed     About

Quote of the day

Programming wisdom:

Someone wrote to me once suggesting that JSLint should give a warning when a case falls through into another case. He pointed out that this is a very common source of errors, and it is a difficult error to see in the code. I answered that that was all true, but that the benefit of compactness obtained by falling through more than compensating for the chance of error. The next day, he reported that there was an error in JSLint. … I investigated, and it turned out that I had a case that was falling through. … I no longer use intentional fall throughs.

-Douglas Crockford

* * *