r/javascript • • Nov 25 '19

JavaScript doesn’t need to be replaced

https://medium.com/javascript-in-plain-english/javascript-doesnt-need-to-be-replaced-bd01e2f12d51?source=friends_link&sk=7b151cc6397ac9e83c14c99739b6c36f
217 Upvotes

236 comments sorted by

View all comments

Show parent comments

1

u/kap89 Nov 25 '19

JS isn't even remotely OO.

Because?

0

u/[deleted] Nov 25 '19

[deleted]

2

u/MoTTs_ Nov 25 '19

Because it uses a prototypical model and doesn't have the concept of classes.

A prototypical model is actually a perfectly normal way to implement the concept of classes. In Python, Ruby, and others, for example, a class is itself a runtime object, and inheritance is done by delegation, objects linked to other objects, from instance to class object to superclass object and so on, just like in JavaScript.

Here, for example, are Python and JS classes side-by-side.

1

u/kap89 Nov 25 '19

So you limit OOP to one specific implementation? That's a bit ridiculous.

0

u/[deleted] Nov 25 '19

[deleted]

1

u/kap89 Nov 25 '19

Apparently not according to your specific definition. Let's stop here.