It is too harsh to call JavaScript an abomination. I would call it the ManBearPig of programming language:

- "appear to be an ordinary procedural language" (half man)- "has more in common with functional languages like Lisp or Scheme than with C or Java" (half bear)- "is now a complete object-oriented programming language" (half pig)

> My two cents regarding "bad" languages:> I've written lots of code in more languages than I care to> remember and over more years than I care to admit, and> have to say that I never understood the bashing of any> language. It's not that I'm oblivious to a specific> language's faults- its just that they are never relevant.> If I choose to implement something in a specific language> (including JavaScript), it is because it is the best tool> for the specific job I wish to perform. It doesn't mean it> has no faults. What it does mean is that I just need> adjust my programming to avoid those faults and to> leverage the good parts. In time, as the language evolves,> the good parts overweigh the bad anyway. > > Hopeless optimist here... :-)

In each team I worked so far there was one colleague who showed an almost perfect equanimity towards tools. He was content with what his team leader has given to him and if the tools changed he was content with them as well. The "right tool for the job" was the tool the team was using.

I wonder if most of us would accept that those people have sound instincts. We are permanently producing our individuality, our tastes and strong opinions and intellectual differences and progress as if this was a good odor and find those irritating that see no good reason or even madness in all of this. They don't even actively liberate themselves from those opinions as if this was a spiritual exercise. They just don't get affected by them.

> Well, in my experience, the language chosen is most often> the result of FOTM considerations of The Suits. If "best> tool" were the criteria, far more SQL would be used. As> it is, client code (in various source) is used far more> than is warranted.

I've yet to come across a case where the language or tools were chosen by "The Suits" (whoever they are). In reality, unless the project is a long term one, they are usually chosen by the software developers on the basis of whatever's fashionable at the time. I agree with you about SQL. Too many programmers know a lot less SQL than they think they do.

A small lexical syntax excerpt from an ANTLR implementation of the SQL 2003 grammar. I was surprised it was bigger even than that of C++, probably because I also only ever dealt with tiny subset covered by most introductory texts.

Bruce your TIJ was the seminal Java programming book for me for many years and I highly recommended it to everyone who asked me about learning Java.

So it makes me very sad to read such informed tripe in this post. At first I thought you must be having a laugh, but your follow-up comments seem to indicate you're actually serious.

Others have already pointed out how inaccurate most of your arguments against JS are rather than of being directed at the DOM, poor browser implementations (older IE's) and a general wild rant against Web dev technologies in general.

I mainly want to point out how you seem to have an implied agenda that vendor controlled technologies are somehow superior to the open standards that make up the current web triumberate (html/css/js) is also complete rubbish and constant comparison to Flash (I guess you mean AS3 lang) as some kind of worthy alternative to ES3 (now ES5 in all "modern" browsers) is just plain bizarre.

I think your references to Crockfords supposed dislike of JS are also off the mark, heres just one ercent quote from him:

"There are certainly a lot of people who refuse to consider the possibility that JavaScript got anything right. I used to be one of those guys. But now I continue to be amazed by the brilliance that is in there"(http://t.co/bawSe7f)

I also find strange your criticism of using AJAX libraries (sic) as using another language. I assume you are referring to libraries such as the widely used jQuery. But from what I've read of opinion pieces out of the Ruby community, DSLs are supposed to be a highly valued design pattern. In fact quote *you*:

If you want to critique JS as a language rather than specific browser implementations of it, try using server-side frameworks like RingoJS or NodeJS. That might give you a bt more perspective and education on the wider world of JS. For instance they both implement the CommonJS "require()" sepc which has essentially provided a solution to the global namespace issue that you and many other JS detractors seem to focus on. NodeJS is particular interesting in its transfer of the browsers async programming model into the server-side space, though its hardly a new idea (python, ruby async servers have been around for a while) JS seems to be much better suited to this than those languages.

That article that you wrote critiquing python 3 (back in 2009) that I quoted you from is a far, far better and reasoned piece. I assume that it stemmed from a fair bit of use and study of Python by yourself. I would hope that you give JS and (html/css) for that matter the same respect and courtesy of use and learning before you take it upon yourself to write another critique for their short comings.

> I've yet to come across a case where the language or tools> were chosen by "The Suits" (whoever they are). In> reality, unless the project is a long term one, they are> usually chosen by the software developers on the basis of> whatever's fashionable at the time. I agree with you> about SQL. Too many programmers know a lot less SQL than> they think they do.

I just got back from an interview. RoR is the chosen platform. The Suits are much enamored of it. The devs I talked to weren't all that keen, for obvious reasons. But RoR it is.

> > I agree with you> > about SQL. Too many programmers know a lot less SQL> than> > they think they do.> > Sorry, Artima, but I couldn't resist:> >

> reserved_word :> ADD...> > non_reserved_word :> ABS...>

> > A small lexical syntax excerpt from an ANTLR> implementation of the SQL 2003 grammar. I was surprised it> was bigger even than that of C++, probably because I also> only ever dealt with tiny subset covered by most> introductory texts.

IIRC, the syntax of "bare C" is 20 operators, nothing more. Which is why it used to be called (Meyer, in particular) The Portable Assembler. The rest comes from the libraries.

I gather that the reason for this msg. is that SQL is "bad" due to the high keyword count. Not the first time I've heard that more keywords === more bugs. So I went looking.

where:N1 = actual number of operatorsN2= actual number of operandsn1 = the number of distinct operators in the program (e.g. keywords).n2 = the number of distinct operands in the program (e.g. data objects)

> I gather that the reason for this msg. is that SQL is> "bad" due to the high keyword count. Not the first time> I've heard that more keywords === more bugs.

I didn't get that impression at all. I thought Kay was demonstrating that there was a lot more to SQL than the SELECT statement. Other than what you wrote above, I didn't see anyone mention that SQL was bad or that it was buggy.

> > I gather that the reason for this msg. is that SQL is> > "bad" due to the high keyword count. Not the first> time> > I've heard that more keywords === more bugs.> > I didn't get that impression at all. I thought Kay was> demonstrating that there was a lot more to SQL than the> SELECT statement. Other than what you wrote above, I> didn't see anyone mention that SQL was bad or that it was> buggy.

I leapt to the conclusion, given that C++ is widely condemned for its syntactic complexity, and was being mentioned along with SQL. But you're correct, the direct statement wasn't made.

Bruce, I like you for your highly opinionated posts (even though you are sometimes wrong), but here I believe you were mislead on the wrong path by Mr. Crockford. Although he is mostly right in his particular opinions, his "Good parts" made in my opinion more harm than good. All those people who don't understand Javascript and who are prepared to hate it, read it just as an evidence for their disgust.