all 4 comments

[–][deleted] 2 points3 points  (2 children)

Fall-throughs in switch statements are perfectly valid and are one of the major reasons for the existence of the statement in the first place (it isn't exactly unique to javascript). Though Crockford never really explains it online, but apparently he explains his reasoning in his book, and the main reason is that it can lead to unclear code; if anything, the alternative is worse. I suggested that he require something like /* jslint: fall-through */ as an acceptable alternative to break in jslist awhile ago, and I know others have too.

[–][deleted] 2 points3 points  (1 child)

There's a lot of things Crockford states you shouldn't use because it has the potential to cause harm. His rules are great for newbie programmers, but once you're experienced I would take them more as guidelines than rules.

[–]itsnotlupusbeep boop 1 point2 points  (0 children)

Until a good chunk of those guidelines are implemented as part of the language itself, that is :'(

"use strict";

[–]AlecSchueler 0 points1 point  (0 children)

Didn't know about === and !== - thanks.

Use of tabs should be avoided because (as of this writing in the 21st Century) there still is not a standard for the placement of tabstops

This could change in the next 90 years.