News for hackers. Stuff that matters.
Re:ES6 in Depth: Classes by TazeTSchnitzel on Thursday July 23, 2015 @03:33PM (#9937941)
The flexibility of prototypical inheritance is one of JavaScript's greatest assets. JavaScript: The Good Parts includes several different approaches to OOP which prototypes make possible.

`class` just picks one and pretends the rest never existed.

Re:ES6 in Depth: Classes by chc on Thursday July 23, 2015 @03:58PM (#9938110)
I don't see what's wrong with that. Converging on one way of doing things is part of the purpose of a standard. We still have the option of implementing a different method if we prefer, just as much as we ever did.
Re:ES6 in Depth: Classes by angersock on Thursday July 23, 2015 @05:18PM (#9938596)
If it's truly a standard, there should be no other options.

Instead, this sets the stage for lots of OOPish JS which feels very different from a lot of existing code out there, and will result in awkward shims to interface the different paradigms.

We already see such ugliness in C++.

Re:ES6 in Depth: Classes by chc on Thursday July 23, 2015 @05:39PM (#9938693)
> If it's truly a standard, there should be no other options.

That's a bit strong. Most languages come with a standard set of data structures, but that doesn't mean they make it impossible to implement other data structures if it suits you (e.g. few languages include binary trees as a standard data type, but that doesn't mean you can't use them).

C includes standard string algorithms, but that doesn't mean you can't write your own — you can even create your own string type if C strings are problematic for some reason.

Many things in many languages are there to offer a reasonable default that is generally useful. This seems along those lines to me.

Re:ES6 in Depth: Classes by coldtea on Thursday July 23, 2015 @07:51PM (#9939226)
>If it's truly a standard, there should be no other options.

That has never been the case with most standards. No see why start now. If it's a standard, it should just be present to all engines, and (but not necessarily) the most popular option.

Nothing about it being a standard necessitates it should be "the only option".

>Instead, this sets the stage for lots of OOPish JS which feels very different from a lot of existing code out there

Quite the opposite. This sets the stage for finally having code that looks THE FUCKING SAME as other code.

Instead of 200 ad-hoc implementations of the same exact OOP pattern -- which is what we have now.

Re:ES6 in Depth: Classes by frik on Thursday July 23, 2015 @03:36PM (#9937964)
Exactly! Sadly many misunderstand JavaScript and don't even know or misunderstand prototype-based inheritance: https://en.wikipedia.org/wiki/Prototype-based_programming

Lua is another well know language that has prototype-based inheritance.