News for hackers. Stuff that matters.
Re:Refactoring Legacy JavaScript Code to Use Classes by Lazare on Tuesday March 07, 2017 @06:48PM (#13816422)
> the "class" keyword was a huge mistake. There are no classes in Javascript, there are only objects

That's true if you define the word "class" to not include JS classes, but in that case, you can use the keyword and still "embrace" prototypal inheritance, since as you say, it's all just objects (even if you use the class keyword).

Alternatively if you use a more flexible definition of the word class, then your assertion is not true, because JS does have classes, they just are implemented via prototypes.

Either way, I don't see how your comment is correct. Is it all objects, or not? :)

There are no comments on this comment yet.