Slashdot Mirror


ECMAScript 6 Is Officially a JavaScript Standard

rjmarvin writes: The ECMAScript 6 specification is now a standard. ES6 is the first major revision to the programming language since 1999 and its hallmark features include a revamped syntax featuring classes and modules. The Ecma General Assembly officially approved the specification at its June meeting in France, ECMAScript project editor Allen Wirfs-Brock announced.

9 of 80 comments (clear)

  1. So that means in ten years we can use it right? by dmgxmichael · · Score: 4, Insightful

    I hate how legacy browsers act as stones around our necks.

  2. What's in Javascript 6? by Anonymous Coward · · Score: 5, Informative

    Good overview here: http://es6-features.org

    The big one is real classes. No more prototype boilerplate.

  3. Spec by TFlan91 · · Score: 4, Informative

    Since actually having a link to the spec in the announcement of the spec would be helpful...

    http://www.ecma-international....

  4. Re:Yay! by ShanghaiBill · · Score: 3, Informative

    What kind of features were worthless?

    Semicolon insertion.
    Idiotic scoping rules.
    Bad handling of NaN and null.
    Hidden prototype items in arrays/objects.
    "with" statement.
    "==" not working like "===".
    "void"

    Many more listed here: Bad parts
    And here: Awful parts

  5. Prototypical by nmb3000 · · Score: 4, Informative

    revamped syntax featuring classes

    So they just gave up on the whole prototype system and duct taped class-based OO on top of it? That's actually kind of sad -- It was a special aspect of Javascript that set it apart from other languages, and homogenization is boring. I guess maybe today's "Javascript developers" just couldn't wrap their heads around it.

    Here's a rundown of the new features if anyone else hasn't been following ES6 and is curious. A few of note are

    scoped and const declaration via let and const,
    lazy iterators and generators,
    format/heredoc strings,
    and varargs ala Lua.

    Overall this looks like a good step in bringing Javascript closer to being on par with more modern languages.

    --
    "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
    /)
    1. Re:Prototypical by SirAnodos · · Score: 3, Insightful

      So they just gave up on the whole prototype system and duct taped class-based OO on top of it? That's actually kind of sad -- It was a special aspect of Javascript that set it apart from other languages, and homogenization is boring. I guess maybe today's "Javascript developers" just couldn't wrap their heads around it.

      They did not give up on the prototype system. To quote from the link you shared:

      ES6 classes are a simple sugar over the prototype-based OO pattern... Classes support prototype-based inheritance, super calls, instance and static methods and constructors.

      It's just sugar. It's all prototype inheritance underneath the sugar, and you are still free to not use the sugar and keep using prototype inheritance like you always have.

  6. The only language I've ever hated by Snotnose · · Score: 3, Funny

    I've used a lot of languages in the last 30 years, the only one I actively learned to hate was Javascript. Biggest problem being "everything is a global", followed by "Scope? We don't need no stinkin mouthwash", and finally having the behaviour be different on different machines because reasons.

    After 6 months of schedule slipping and very poor quality we finally convinced management to let us use perl. Perl ain't perfect, but it's predictable.

    1. Re:The only language I've ever hated by Anonymous Coward · · Score: 3, Insightful

      > Biggest problem being "everything is a global"

      6 months, and you did not figure out how Javascript scoping works? ... and you went back to perl ...

      ouch.

    2. Re:The only language I've ever hated by Snotnose · · Score: 3, Insightful

      Of course we figured it out. The answer was "very poorly".