Announcement

Collapse
No announcement yet.

Google's Dart Language Approved By The ECMA

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

  • #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


            • #16
              Originally posted by sime2009 View Post
              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.
              Speed is nice but bringing tools like static analysis, having a sane syntax, and not being a memory leaking pig are far more important, and if we can displace javascript and the hacks built ontop of it like typescript, coffeescript, et al, a lot of the more annoying issues that have cropped up with web browsers since HTML5 + JS started to displace flash should be fixed.

              As far as giving Google huge power over the web, I'm going to be very blunt here. They're the only ones out of everyone making browsers and the w3c to actually be trying to fix the web, while Mozilla is just playing NIH, and Microsoft and Apple are just siding with Mozilla to go against Google. Now personally I don't care if it's PNaCl, Dart, or something else that replaces Javascript, as long as it's strongly typed, designed to be toolable, and is strict about errors.

              Comment


              • #17
                PNaCl

                There is more simple solution for all of this.
                Firefox should implement PNaCl, so it becomes de facto standard, and than we could finally end this JavaScript dictatorship.
                U could than write web apps in any language u like.
                And don't forget 3D games on web, making portable 3D games would be so easy, which means more games on linux

                But Mozilla refuses to implement it and they go with asm.js which is just much worse version of PNaCl.
                One could say that u get source when using asm.js. Yeah, no u don't, u get JavaScript source, not your native language, and for people reading it, it is no different than bytecode.

                Mozilla, for the love of God and all people who don't like JavaScript, please implement PNaCl.

                Comment


                • #18
                  Originally posted by Temlar View Post
                  There is more simple solution for all of this.
                  Firefox should implement PNaCl, so it becomes de facto standard, and than we could finally end this JavaScript dictatorship.
                  U could than write web apps in any language u like.
                  And don't forget 3D games on web, making portable 3D games would be so easy, which means more games on linux

                  But Mozilla refuses to implement it and they go with asm.js which is just much worse version of PNaCl.
                  One could say that u get source when using asm.js. Yeah, no u don't, u get JavaScript source, not your native language, and for people reading it, it is no different than bytecode.

                  Mozilla, for the love of God and all people who don't like JavaScript, please implement PNaCl.
                  I will definitely agree that PNaCl has definitely been the best option so far I've seen as an alternative to JS

                  Comment


                  • #19
                    Originally posted by Luke_Wolf View Post
                    Now personally I don't care if it's PNaCl, Dart, or something else that replaces Javascript, as long as it's strongly typed, designed to be toolable, and is strict about errors.
                    Why not, don't support one language dictatorship, but every language democracy, which is PNaCl.

                    I personally would love to make web apps, but not in JS, and I don't like Dart too much.

                    Edit: ninja'd

                    Comment


                    • #20
                      I have used it

                      Originally posted by Luke_Wolf View Post
                      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.
                      and for me it saved the day. Useful error messages, more java like. I used it last January. Possibly now it is better. I do not want to touch javascript.
                      Disclaimer : This is a personal statement based on my own experience.

                      Comment

                      Working...
                      X