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.

17 of 80 comments (clear)

  1. Yay! by sribe · · Score: 2

    This really marks the triumph of the newish and competent committee over the prior boneheads who wasted years trying to shove XHTML down our throats while adding features that were so poorly designed as to be nearly worthless. (ES5 marked the transition, the first cleanup after the prior mess, and ES7 will finally get us to where the language should have been 10+ years ago if not for all the time wasted by wankers with no clue about actual software development.)

    1. Re:Yay! by Anonymous Coward · · Score: 2, Interesting

      How dare people want you to actually close tags and use consistent casing!

    2. 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

  2. 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.

  3. Here is an answer (sort of) by DumbSwede · · Score: 2

    Seems it will roll out peicmeal like other HTML JavaScript enhancements in the past

    A quick google turned up this useful link.

    Browser Compatibility

    With many browsers you can use many features now (but not all).

  4. 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.

  5. Re:Great by ChunderDownunder · · Score: 2

    Pretty quickly. The Browser Wars are over; Chrome won.

    (posted from iceweasel)

  6. 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....

  7. Wow, they got modules before C++ by UnknownSoldier · · Score: 2

    Surprised they got modules so quickly. Someday modules will eventually make it into C++ ...

    * 2006 http://www.open-std.org/jtc1/s...
    * 2014 http://www.open-std.org/jtc1/s...
    * 2015 http://www.open-std.org/JTC1/S...
    * 2015 (April) https://isocpp.org/files/paper...
    * http://www.infoq.com/news/2015...
    * http://stackoverflow.com/quest...

    I see the "use strict" HACK is still optional ("An ECMAScript Script syntactic unit may be processed using either unrestricted or strict mode syntax and semantics. ") but at least in the case of a class is mandatory ("A ClassBody is always strict code.") Someday Javascript will stop being a shitty language. Sadly it won't be this year ... :-/

  8. 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.

    2. Re:Prototypical by null+etc. · · Score: 2

      You can still use JS the original/correct way

      Oh, thank god there's finally a single person who can serve as the undisputed arbiter of the "correct way" to use JavaScript.

      Now if only we could force the entire world to listen to you.

  9. Re:So it was approved in France? by dave420 · · Score: 2

    Whereas if it was approved in the US it would be covered in bacon grease and shoot up a church! Lazy stereotypes are fun!

  10. 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".

  11. And Yet... by DumbSwede · · Score: 2

    While not "Officially" Codified as a Capital Crime, it is often sanctioned and applied by the state.

    Apostasy in the Islamic Republic of Iran

    From Wikipedia on Apostasy "Iran – illegal (death penalty)"

    The catch here is it is often applied under the broad umbrella "blasphemy."

    What else makes my journal entry a rant? Who is being more intellectually dishonest here?

    Do you stand corrected that the death penalty is often given in Iran for apostasy, or do you have some evidence to the contrary proving that the hundreds of links from sources like wikipedia.org, et al are Western propaganda?

    Rant implies it is not a well justified set of accusations and denouncements. As stated in the letter I have no truck with followers of Islam who allow those around them to believe and live as they want.