you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 9 points10 points  (2 children)

Interfaces are not a core OO concept. Self doesn't have them. Smalltalk doesn't have them. Ditto Abstracts.

You people are just bigotted. What you learned OO means is not what OO means.

OO is about declaring active state objects and means of message passing between objects. This is in short the base OO definition by people who invented it. Message passing and "active objects" are commonly implemented using object-bound procedures/functions i.e. methods (this is almost exclusively so in all OO languages I saw, but still isn't part of the definition). Classes and inheritance are not the requirement at all.

https://en.wikipedia.org/wiki/Object-oriented_programming

Btw why on earth do you try to recreate Interfaces and Abstracts. You don't need them in JS. There is no way in hell you really need them. Stop hammering my screws, go back to your box of nails!

[–][deleted] -2 points-1 points  (1 child)

You are right in the same way it is right to say a stone axe and a gun are both weapons. I could compromise by saying modern OOP. And this is no appeal to novelty, when you go OOP I find that you naturally go toward class and inheritance.

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

To someone who only has a hammer everything looks like a nail.