For many years I have disliked JavaScript, and avoided its use unless absolutely necessary. This goes back many years from some of the atrocious things JavaScript was used for on the web, and the mess of a language it was to use in early web browsers. About 2 years ago I gave it another look, but all my dislike was confirmed by a terrible book I had purchased. I will not name it, as I am embarrassed actual money was handed over.
There can be no doubting that in the past couple of years, a lot of great work has been done using JavaScript to produce some really usable web sites. Obviously I am missing something. So given I had already decided to go to the web directions 2008 conference in Sydney, I paid up the extra to attend the JavaScript workshop by Douglas Crockford. This is a person who can show me the light.
Its seems js or ECMAScript, or whatever it is called, is really a chameleon. And for all its terrible parts, JavaScript does have good parts. My impressions of a simple language with some OO, has been completely changed. Prototypal Inheritance, lambdas, closures, object augmentation, and functions as first class objects. All of this surprised me, and many others. There is a different way of thinking possible, but it was cloaked in a classical inheritance model.
“JavaScript instead uses operators that look classical, but behave prototypally.”
Douglas had too much material to present in 1 day, so some was skipped, and parts skimmed. So after a mentally intense day, I now have a very great appreciation for js, and looking forward to giving it some real use. Ideas and preconceptions need to be unlearnt, but this is good.