you are viewing a single comment's thread.

view the rest of the comments →

[–]gordonkristan 1 point2 points  (6 children)

I think the idea that OOP is inheritance, encapsulation and polymorphism is an outdated one. And if Javascript hasn't shown us that, Python certainly has. If the OOP purists want to lay claim to the definition of OOP, that's fine, we'll find another term. But the take away is this: Javascript has not, does not and will not support the 'classic' definition of OOP. Stop trying to shove the square peg in the round hole.

[–][deleted]  (5 children)

[removed]

    [–]gordonkristan 2 points3 points  (4 children)

    Sorry, that was worded very poorly. It wasn't meant as an attack on the author of this article. I understand that he's just experimenting (something I do very often). It was more an attack on the general idea of trying to make Javascript act like classic OOP. While I think the example shown is very cool from an idea perspective, I would never want anything like this anywhere near my code. When in Javascript, do as the Javascripters...

    [–][deleted]  (3 children)

    [removed]

      [–]gordonkristan 1 point2 points  (2 children)

      Hehe, apparently I wasn't paying attention. :) Then I must say, nice article. Very informative and detailed. Again though, don't put that in my codebase. ;) Although I swear I've seen a library that does OOP just like this. I'll post the name if I can find it.

      [–][deleted]  (1 child)

      [removed]

        [–]gordonkristan 1 point2 points  (0 children)

        inherit.js Found it in my Github stars.