News for hackers. Stuff that matters.
Re:Javascript: is 'this' a code smell? by ghotli on Thursday November 04, 2010 @09:48PM (#1871656)
I'd say this guy is not adapting to the expressiveness of the language. He wants objects, but he's using a prototypical closure oriented language. 'this' is a needed construct to deal with the malleable scope contexts that closures provide.
Re:Javascript: is 'this' a code smell? by dmatking on Thursday November 04, 2010 @10:21PM (#1871734)
It does make me question why the books and tutorials I have read on JavaScript want to cover so many object-oriented techniques. Why not treat it more like a functional or "prototypical closure oriented" language? Perhaps the author is on to something.
Re:Javascript: is 'this' a code smell? by blasdel on Saturday November 06, 2010 @05:02AM (#1876506)
Because it's so much more ironic to brutalize the language with classicist inheritance and call it 'Prototype.js'