Image via Wikipedia
These are exciting days for JavaScript, my note in Google Reader:Crockford's _JavaScript: The Good Parts_ + jQuery + Google's Closure Library + Compiler = the best of modern Javascript
Very interesting article by Michael Bolin that shows what Google's Closure Library + Compiler bring to the table, and how you might change your clean JavaScript coding style:
Cover of JavaScript: The Good Parts
Crockford appears to object to the pseudoclassical pattern because: 'There is no privacy; all properties are public. There is no access tosuper
methods ... Even worse, there is a serious hazard with the use of constructor functions. If you forget to use the new
prefix when calling a constructor function, then this
will not be bound to a new object ... There is no compile warning, and there is no runtime warning.'This article discusses the advantages of the pseudoclassical pattern over the functional pattern. I argue that the pattern used by the ClosureLibrary paired with the Closure Compiler removes existing hazards while I also examine the hazards introduced by the functional pattern (as defined in The Good Parts)."
No comments:
Post a Comment