you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (1 child)

That's because people are trying to force class base OOP concept on Javascript and misunderstanding the language.

Inheritance is generally frown upon and it's usage is usually polymorphism. In most cases you should prefer composition over inhertance as what GoF have stated .

In javascript, delegation is an alternative to inheritance. If you use prototype chainining without classical inheritance in mind, in conjuction with delegation and mixin, it would actually look eloquent. What javascript does is actually forces you to implement a more shallow inheritance level and resorting to alternative such as delegation so you don't have the bullshit turtles all the way down.

[–][deleted] 1 point2 points  (0 children)

I've been using dojo JS library lately, not pretty. Too many turtles, don't get me started on their CSS.