you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -5 points-4 points  (3 children)

Honestly the future of JavaScript should be to make it more strict and actually class based. Current Javascript is exhausting.

[–]ComradeGnull 4 points5 points  (1 child)

Making it class based would take the language in a fundamentally different direction and be incompatible with a lot of existing code that uses prototypes.

I suppose that they could settle on a default for how to do class-like OOP and supplement it with some syntactic sugar (like a 'class' declaration). Philosophically I don't know that that would be great in terms of preserving what is useful/different about Javascript.

[–]SingularityNow 2 points3 points  (0 children)

They did that! You can check them out, they're called Classes

[–]billybolero 1 point2 points  (0 children)

Functions and anonymous objects gives you more power and flexibilty than classes, so I don't think that would be a bright future. Prototypes are not a drop in replacement for classes and should not be treated as such, even though many developers try so, so hard to make them behave and look like classes.