Announcement

Collapse
No announcement yet.

ECMAScript 6 Approved As New JS Standard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ECMAScript 6 Approved As New JS Standard

    Phoronix: ECMAScript 6 Approved As New JS Standard

    ECMAScript 6 (ECMAScript 2015) has been approved at this week's ECMA General Assembly meeting for becoming the latest standard edition of JavaScript...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    And now browser vendors can start supporting the features without big *experimental* labels / flags.

    Comment


    • #3
      And we might be able to use it without recompiling source cross browser by 2025!

      Comment


      • #4
        Many of the changes in ECMAScript 6 are not backward compatible such as the new block scoping, lexical this and string interpolation. Changes like these will cause scripts to break that worked fine under previous versions.

        So how will this work in browsers? when you import a module do you specify what version of ECMAScript to use? if so, can you mix and match ECMAScript versions? Given the insane amount of javascript out there, there is no way the browsers can just upgrade to the new ECMAScript 6 and drop support for previous versions.

        Comment


        • #5
          Originally posted by paulpach View Post
          Many of the changes in ECMAScript 6 are not backward compatible such as the new block scoping, lexical this and string interpolation. Changes like these will cause scripts to break that worked fine under previous versions.

          So how will this work in browsers? when you import a module do you specify what version of ECMAScript to use? if so, can you mix and match ECMAScript versions? Given the insane amount of javascript out there, there is no way the browsers can just upgrade to the new ECMAScript 6 and drop support for previous versions.
          I don't how about block scoping, but lexical this is only when you're using fat arrow, string interpolation uses `` instead of "" or ''. So those changes does not break anything and I guess block scoping also, but I don't know how to explain that and maybe the browsers won't support this feature.

          Originally posted by zanny View Post
          And we might be able to use it without recompiling source cross browser by 2025!
          Umm... check the compatibility table ES6 is almost there and you could always use transpillers https://kangax.github.io/compat-table/es6/

          Originally posted by zanny View Post
          And we might be able to use it without recompiling source cross browser by 2025!
          You probably thought about CSS, because javascript was never prefixed expect for node.js where you should use --harmony flag when executing scripts.
          Last edited by dolohow; 18 June 2015, 03:36 PM.

          Comment


          • #6
            you could always use transpillers
            Thats the point! ECMAScript 6 might as well be "Use Babel" because you can't just ship ECMA6 only scripts until you are confident enough of your userbase is on browsers that support the whole spec. That will probably take a decade, at least. And using compilers like that is added complexity and code bloat all for the sake of... reducing code bloat in the language syntax, mostly. Centralizing that complexity in a translation layer is an improvement, but it is still there.

            Comment


            • #7
              Or you could use a JS framework that automatically detects the version of JS/ECMAScript that your browser supports and adds fallbacks/stubs for the features that aren't supported. They don't add a lot of overhead...unless you like putting constantly updating sections and fan/accordion menus all over the place.

              Comment


              • #8
                Originally posted by zanny View Post
                Thats the point! ECMAScript 6 might as well be "Use Babel" because you can't just ship ECMA6 only scripts until you are confident enough of your userbase is on browsers that support the whole spec. That will probably take a decade, at least. And using compilers like that is added complexity and code bloat all for the sake of... reducing code bloat in the language syntax, mostly. Centralizing that complexity in a translation layer is an improvement, but it is still there.
                Using compilers does not add any complexity as you would only include the minified and compiled version of your script and the compilation process can be fully automated using gulp or grunt. You could even register a watch on the file via inotify (using of course grunt plugin) to compile on change.


                Originally posted by Nobu View Post
                Or you could use a JS framework that automatically detects the version of JS/ECMAScript that your browser supports and adds fallbacks/stubs for the features that aren't supported. They don't add a lot of overhead...unless you like putting constantly updating sections and fan/accordion menus all over the place.
                You can't implement everything as a polyfill in case of ES6

                Comment


                • #9
                  How in the world is concurrency not in this release, has this board been held under ground isolated from society for a decade?

                  Comment


                  • #10
                    Originally posted by toyotabedzrock View Post
                    How in the world is concurrency not in this release, has this board been held under ground isolated from society for a decade?
                    I'm going to be very blunt... if you need concurrency in Javascript, just like if you need SIMD in Javascript... well... You're doing it wrong and should be writing a native application instead. Quit abusing a language designed for XML manipulation and basic interface interactivity already.

                    Comment

                    Working...
                    X