The semicolon wars are back! This time, Crockford says that
There are idiot web developers who are using commas in place of semicolons because they need to be free to express their individual idiocy. It turns out there are consequences.
This is in reference to a post by an Opera developer who says that Twitter crashes itself with commas.
The problem is, both of these posts are wrong on the Internet.
The culprit is a very large Javascript file that contains a very large expression built up using the comma operator (derived from C), which the Opera browser chokes on. By “very large file” I mean 4 megabytes, and by “very large expression” I mean one that contains more than 1000 nested comma expressions.
What should be obvious is that such a file is not written by hand by a developer seeking to express individuality or personal style; this is a computer-generated program. Computers don’t have any style to express.
I’ve written a few compilers in my time, and in every case, there has come a day that someone, somewhere, feeds the compiler a crazy-large computer-generated file, and the compiler chokes. Sane people call this a compiler bug, not a user error. Or as Crockford himself says,
I was shocked when I moved into systems programming and how the programmers actually held the customer in contempt.
I think every programmer should work in customer support for the product they’re delivering.
Exactly. The customers of a compiler or programming tool are those producing programs to be compiled, including computer-generated programs. These can be just as useful and important as hand-written programs. At the very least, they are useful for uncovering compiler bugs.