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

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

              In which I port a snazzy little JavaScript audio web app to Dart , discover a bug, and high-five type annotations. Here's what I learned. ...


              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

                    Working...
                    X