DEV Community

Discussion on: What do you dislike about your favorite language?

Collapse
 
pris_stratton profile image
pris stratton • Edited

JS is my favourite but I really dislike the class syntax that was introduced in ES6. The prototype chain is easy to understand and doesn’t need to be hidden beneath “class”, “extends” and “super” which feel more like Java.

Collapse
 
notngan profile image
Ngan B. Nguyen • Edited

Agreed. I think class was added just to satisfy OOP programmers from other languages, and to confuse new learners.

In JS, the OOP concept is prototype-based. The class is actually just built on top of the constructor function.

Collapse
 
omenlog profile image
Omar E. Lopez

I agree with you, and for me the worst thing about the introduction of pseudo-classes is that new developers tend to think about it in the same way that it work in other OOP languages, working on projects and building some things without really understand the inner working of JS

Collapse
 
pris_stratton profile image
pris stratton

Precisely.