Announcement

Collapse
No announcement yet.

Google's Dart Language Approved By The ECMA

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

  • Google's Dart Language Approved By The ECMA

    Phoronix: Google's Dart Language Approved By The ECMA

    Ecma International has approved Google's Dart web programming language as the latest ECMA standard...

    http://www.phoronix.com/vr.php?view=MTczODA

  • #2
    I'll be interested to see if this actually replaces js.
    I've not yet tried dart, though it looks like I might have to now.
    Dart better be one of the best designed languages in order to displace js, otherwise what's the point? Yeah, it'll be faster, and I think it supports modules (though so does es6), but to replace something like js it needs to offer something unbelievably compelling, not just small changes, though important, changes.
    That said, since the web is becoming the default platform "anything" that can be done to improve it is a good thing.
    I hope the DOM gets tackled next.

    Comment


    • #3
      Originally posted by liam View Post
      I'll be interested to see if this actually replaces js.
      I've not yet tried dart, though it looks like I might have to now.
      Dart better be one of the best designed languages in order to displace js, otherwise what's the point? Yeah, it'll be faster, and I think it supports modules (though so does es6), but to replace something like js it needs to offer something unbelievably compelling, not just small changes, though important, changes.
      That said, since the web is becoming the default platform "anything" that can be done to improve it is a good thing.
      I hope the DOM gets tackled next.
      Dart is interesting Dart supports Classes as first class citizens, rather than a hack onto the current system, the language syntax is modeled much closer to Java, C/C++ and those languages. It compiles to Javascript so that it will work on modern browsers today, versus ES6, which is not even standardized yet, much less available in browsers.

      When ES6 is in browsers, Dart will compile down to use its features.

      It is intended to be what folks are calling a "full stack" language, meaning it can run in the browser, as well as in the server, and on the client.

      It might be more accurate to think of it as a bettered designed Java/c++/C# for the web, rather than as a derivative of Javascript.

      http://blog.sethladd.com/2014/05/i-p...art-heres.html

      This guy shows what porting a simple javascript application to Dart looks like, and the results.

      Comment


      • #4
        Originally posted by liam View Post
        I'll be interested to see if this actually replaces js.
        I've not yet tried dart, though it looks like I might have to now.
        Dart better be one of the best designed languages in order to displace js, otherwise what's the point? Yeah, it'll be faster, and I think it supports modules (though so does es6), but to replace something like js it needs to offer something unbelievably compelling, not just small changes, though important, changes.
        That said, since the web is becoming the default platform "anything" that can be done to improve it is a good thing.
        I hope the DOM gets tackled next.
        According to the dart home-page, it compiles down to javascript, so at least from an end-user perspective things will work the same. If it simplifies web-application development, great. I avoid as much direct DOM manipulation and raw javascript as I can and do most of my JS coding through JQuery and other libraries that smooth out a lot of the rough edges of JS (and take care of the browser compatibility issues).

        Comment


        • #5
          Originally posted by Veerappan View Post
          According to the dart home-page, it compiles down to javascript, so at least from an end-user perspective things will work the same. If it simplifies web-application development, great. I avoid as much direct DOM manipulation and raw javascript as I can and do most of my JS coding through JQuery and other libraries that smooth out a lot of the rough edges of JS (and take care of the browser compatibility issues).
          Creating llvm frontends to language X so as to compile to js isn't necessarily a huge deal (that's how ask.js is intended to work, after all), so I specifically didn't mention that b/c that's something that could be added to many languages.
          I try to avoid jquery (though I know it's excellent), but I like coffeescript, and apolyfill library is a must.

          Comment


          • #6
            Awesome, hopefully at some point Microsoft, Apple, and Mozilla will be forced to comply as opposed to continuing to obsess on javascript

            Comment


            • #7
              Originally posted by dragorth View Post
              Dart is interesting Dart supports Classes as first class citizens, rather than a hack onto the current system, the language syntax is modeled much closer to Java, C/C++ and those languages. It compiles to Javascript so that it will work on modern browsers today, versus ES6, which is not even standardized yet, much less available in browsers.

              When ES6 is in browsers, Dart will compile down to use its features.

              It is intended to be what folks are calling a "full stack" language, meaning it can run in the browser, as well as in the server, and on the client.

              It might be more accurate to think of it as a bettered designed Java/c++/C# for the web, rather than as a derivative of Javascript.

              http://blog.sethladd.com/2014/05/i-p...art-heres.html

              This guy shows what porting a simple javascript application to Dart looks like, and the results.
              I haven't written in java for a long time but js was supposed to LOOK a lot like java (one of the constraints placed upon it in the first place, iirc). The biggest difference, I think, is that js is prototyped rather than class. I haven't been bothered by that, but if it's something you feel you need it will be in the next es, as you've said (how much it's a hack, I don't know, so I'll just use the duck rule, when the time comes). Now while it's not quite out yet chrome and ff have been implementing features for awhile (ff got arrow functions a few months ago, for instance).
              I already addressed the transpiling aspect in the post above this one.
              JS is already being used in those places. No, it certainly wasn't designed for that but it "works".
              Lastly, I'm aware it's not derived from js, and do indeed think of it in terms of other languages. That's why it needs to be looked at from the perspective of languages other than js. Is it better than c++, python, lua, rust, Haskell, ruby, etc.
              Seth seems to be mainly concerned with tooling without being aware of the tooling that exists for us. Also, js has promises which are basically futures.

              Comment


              • #8
                Originally posted by liam View Post
                I haven't written in java for a long time but js was supposed to LOOK a lot like java (one of the constraints placed upon it in the first place, iirc). The biggest difference, I think, is that js is prototyped rather than class. I haven't been bothered by that, but if it's something you feel you need it will be in the next es, as you've said (how much it's a hack, I don't know, so I'll just use the duck rule, when the time comes). Now while it's not quite out yet chrome and ff have been implementing features for awhile (ff got arrow functions a few months ago, for instance).
                I already addressed the transpiling aspect in the post above this one.
                JS is already being used in those places. No, it certainly wasn't designed for that but it "works".
                Lastly, I'm aware it's not derived from js, and do indeed think of it in terms of other languages. That's why it needs to be looked at from the perspective of languages other than js. Is it better than c++, python, lua, rust, Haskell, ruby, etc.
                Seth seems to be mainly concerned with tooling without being aware of the tooling that exists for us. Also, js has promises which are basically futures.
                On the transpiling front, I will argue firstly that Google did not just add a language frontend to LLVM and then spit out javascript. First, emscripten and its ilk hogtie current languages that know nothing about the current browser environments. Which is fine, since C++ is designed to be somewhat agnostic to its environment.

                Google, however, designed the language with the browser DOM in mind, meaning the language is simpler to use in that use case, and since they integrated it into Dartium, it starts with the same dev tooling that chrome ships with.

                An example of how they took the web into account from Dart's "Improving the DOM" page:
                Better Querying Built IN
                Code:
                // Old:
                // Old:
                elem.getElementById('foo');
                elem.getElementsByTagName('div');
                elem.getElementsByName('foo');
                elem.getElementsByClassName('foo');
                elem.querySelector('.foo .bar');
                elem.querySelectorAll('.foo .bar');
                vs

                Code:
                // New:
                elem.querySelector('#foo');
                elem.querySelectorAll('div');
                elem.querySelectorAll('[name="foo"]');
                elem.querySelectorAll('.foo');
                elem.querySelector('.foo .bar');
                elem.querySelectorAll('.foo .bar');
                Instead of remembering more than ten seperate query selector syntax versions, simply remembering
                Code:
                elem.querySelector('');
                and
                Code:
                elem.querySelectorAll('');
                without having to import jquery to boot.

                The classes paradigm has the advantage, vs the proto construct Javascript uses, in that most colleges teach the classes metaphor. Then those graduates go out and program every language as if it has classes. I am not saying that the proto is wrong, just that it is not understood and used safely/correctly by the majority of those actually programming in Javascript.

                Comment


                • #9
                  I wonder why they keep ignoring lua.
                  Lua has a nice set of features, of which a natural form of sandboxing is a very good one (scripts can never escape the namespace you give them and hence cannot do more than you allow them to). It's always faster than javascript.
                  It's activelly supported as a scripting language for enlightenment so for tizen, mainly by Samsung but also by other tizen companies.
                  Lua is that good that it can run in the linux kernel as a packet filter. (Lookup kmod-lua @ openwrt)
                  Lua is used in a lot of environments (android game development, chrome browser extensions, it is embedded into redhat's rpm package management).
                  And most importantly: it's just plug and play. Link to lua, and give it something to do.

                  Comment


                  • #10
                    Originally posted by Ardje View Post
                    I wonder why they keep ignoring lua.
                    Lua has a nice set of features, of which a natural form of sandboxing is a very good one (scripts can never escape the namespace you give them and hence cannot do more than you allow them to). It's always faster than javascript.
                    It's activelly supported as a scripting language for enlightenment so for tizen, mainly by Samsung but also by other tizen companies.
                    Lua is that good that it can run in the linux kernel as a packet filter. (Lookup kmod-lua @ openwrt)
                    Lua is used in a lot of environments (android game development, chrome browser extensions, it is embedded into redhat's rpm package management).
                    And most importantly: it's just plug and play. Link to lua, and give it something to do.
                    Lua is also used in some really high profile games from Blizzard, namely WOW. However, in terms of usefulness, it would need to be extended for functionality the web currently requires. Which is really all that ECMA6 is doing for current generation Javascript.

                    Dart is designed for where Google sees the web, mobile and servers going over the next few years. The fact that it is open source from the start, as well as an ECMA standard, will hopefully help its adoption by those that will find it most useful.

                    By the way, lua can be run in the browser in javascript. I think I read about that here on Phoronix, though I could be wrong.

                    Comment


                    • #11
                      Originally posted by dragorth View Post
                      An example of how they took the web into account from Dart's "Improving the DOM" page:
                      Better Querying Built IN
                      Code:
                      // Old:
                      // Old:
                      elem.getElementById('foo');
                      elem.getElementsByTagName('div');
                      elem.getElementsByName('foo');
                      elem.getElementsByClassName('foo');
                      elem.querySelector('.foo .bar');
                      elem.querySelectorAll('.foo .bar');
                      vs

                      Code:
                      // New:
                      elem.querySelector('#foo');
                      elem.querySelectorAll('div');
                      elem.querySelectorAll('[name="foo"]');
                      elem.querySelectorAll('.foo');
                      elem.querySelector('.foo .bar');
                      elem.querySelectorAll('.foo .bar');
                      Instead of remembering more than ten seperate query selector syntax versions, simply remembering
                      Code:
                      elem.querySelector('');
                      and
                      Code:
                      elem.querySelectorAll('');
                      without having to import jquery to boot.
                      elem.querySelector() and elem.querySelectorAll() have been in all major browsers back to and including IE8. You don't need Dart or jQuery to get this benefit.

                      Originally posted by dragorth View Post
                      The classes paradigm has the advantage, vs the proto construct Javascript uses, in that most colleges teach the classes metaphor. Then those graduates go out and program every language as if it has classes. I am not saying that the proto is wrong, just that it is not understood and used safely/correctly by the majority of those actually programming in Javascript.
                      You can do class style OO in a prototype system. ES6 adds keywords and sugar to make the standard JS proto system look like classic Java/C++ classes. The result is still prototype based though.

                      Comment


                      • #12
                        Originally posted by liam View Post
                        I'll be interested to see if this actually replaces js.
                        I think that chances of that are very low at the moment. All browsers makers are supporting ES6 and are implementing it. No one is remotely interested in Dart except for Google of course, and Mozilla is pretty much against it.

                        I honestly don't see what Dart brings to the table. There are already heaps of languages which can run on the server and be compiled to JS to run in the browser too. Many of them already have established ecosystems and tooling.

                        Comment


                        • #13
                          Originally posted by sime2009 View Post
                          I think that chances of that are very low at the moment. All browsers makers are supporting ES6 and are implementing it. No one is remotely interested in Dart except for Google of course, and Mozilla is pretty much against it.

                          I honestly don't see what Dart brings to the table. There are already heaps of languages which can run on the server and be compiled to JS to run in the browser too. Many of them already have established ecosystems and tooling.
                          The fact that compiling to JavaScript is done for compatibility reasons with browsers that don't integrate the native dartVM yet should give a hint. Dart code compilled against the dartvm is considerably faster than optimised JavaScript. Most web languages just compile to JavaScript and are held back by the performance constraint of the JavaScript VM itself.
                          Then there is the fact that you can build android apps now using the dartvm and polymer, what internet explorer do is kind of irrelevant as they don't have much of a presence in the mobile industry.
                          Mozilla are likely to revisit their comments once dartvm is enabled in stable chrome as its an ecma standard now not just a Google controlled project.

                          Comment


                          • #14
                            Originally posted by sime2009 View Post
                            I think that chances of that are very low at the moment. All browsers makers are supporting ES6 and are implementing it. No one is remotely interested in Dart except for Google of course, and Mozilla is pretty much against it.

                            I honestly don't see what Dart brings to the table. There are already heaps of languages which can run on the server and be compiled to JS to run in the browser too. Many of them already have established ecosystems and tooling.
                            What Dart brings to the table is breaking the Javascript monopoly on client side scripting with a much better language that's properly designed for the purpose. Yes Dart can compile to Javascript, however Dart is intended to be run "natively" in the browser with compiling to javascript as a fallback.

                            Comment


                            • #15
                              What does "properly designed for the purpose" and "intended to be run natively" actually give me in a real practical sense? And what is the cost?

                              There are plenty of languages which are better designed than JS and which can run inside the browser. If the benefit of running natively is meant to be speed, then the cost is being locked into one browser and a Google monopoly. Even if the Dart VM is taken up by other browsers (unlikely) then we have broken the JS monopoly but also given Google huge power over the language and the web itself.

                              I find the technical advantages lacking, but my biggest problem is with politics and power in the web-space.

                              Comment

                              Working...
                              X