> JavaScript is not an object-oriented language, but a prototypical one.
Both Python and Ruby classes are implemented using prototypes. It doesn't make these languages less object oriented.
Prototypes are an implementation detail, they have a single goal: inheritance thanks to the prototype chain.
The fact is, objects are constructs that carry both behavior and state, in that sense JavaScript is capable of object oriented programming. And it has first class functions, which makes possible implementing some functional programming patterns.
Both Python and Ruby classes are implemented using prototypes. It doesn't make these languages less object oriented.
Prototypes are an implementation detail, they have a single goal: inheritance thanks to the prototype chain.
The fact is, objects are constructs that carry both behavior and state, in that sense JavaScript is capable of object oriented programming. And it has first class functions, which makes possible implementing some functional programming patterns.
Therefore
> JavaScript is not an object-oriented language
is a false statement.
reply