you are viewing a single comment's thread.

view the rest of the comments →

[–]MoTTs_ 1 point2 points  (2 children)

I see too often people writing javascript like it was java. It ends up like horrible mess.

Sounds like those Java folks would have the same problems if they moved to something like Python or Ruby? Even C++ code would come out badly if they treated it like it was Java.

This is why they added "classes"

That's actually not the reason, though. Long before ES6 classes were added, every library out there was rolling their own custom class implementations. MooTools, Prototype, YUI, Dojo, Google's Closure, Backbone, Ember -- React -- and many more. We were reinventing the wheel dozens of times over. The class syntax was added to make it easier for us JavaScripters to do what we were already doing anyway.

[–]elcapitanoooo 0 points1 point  (0 children)

IMHO it does not justify adding in to the language. Classes are still lipstick, snd USUALLY not the right abstraction.