back to article Google throws a 180 on its plans for Dart language

Back in 2013, Google felt the Dart language deserved a native virtual machine baked into Chrome, because it felt JavaScript couldn't deliver the speed it craves. It therefore started the process of getting Dart turned into a standard to help things along. Fast forward to Wednesday and the Dart team, which Google supports but …

  1. Dan 55 Silver badge
    Facepalm

    Argh, another rickety language which compiles on top of JavaScript

    It would be far better just to use an IDE/editor which highlights/forbids dodgy JavaScript and enforces type consistency with comments. That seems to be the objective of all these languages which perch on top of JavaScript so you might as just well do it in JavaScript.

    1. Charlie Clark Silver badge

      Re: Argh, another rickety language which compiles on top of JavaScript

      I think the problem is that many problems with Javascript can't be detected while writing it. Hence the preference for preprocessors that take the guess work out of writing reliable Javascript. The situation is very similar to using a compiler over writing machine or byte code. It's just that the output here is Javascript.

      1. Dan 55 Silver badge

        Re: Argh, another rickety language which compiles on top of JavaScript

        It can certainly run a preprocessor over the the code after saving and highlight problems. Probably more of an IDE thing than an editor thing but nevertheless.

        1. Charlie Clark Silver badge

          Re: Argh, another rickety language which compiles on top of JavaScript

          I suspect the reason for the compiler/transliteration approach is because of the limits of what you can do in the IDE. If you look at how compact TypeScript transliterates to verbose Javascript you can see the limits of what you can reasonably expect in the IDE and still expect to keep developers on board. The verbose JS itself is replete with hints which are essentially for the JIT.

  2. TonyWilk

    One to avoid I think...

    With AngularJS 2.0 having changed to TypeScript, the future doesn't look too rosy for Dart.

  3. CBR600

    TypeScript?

    Excuse my ignorance in this field, but isn't this the same as TypeScript?

  4. Adam 52 Silver badge

    Debugging

    How do they solve the debugging problem? Instrument the JavaScript somehow and call back to the IDE?

  5. Martin
    Coat

    Can't resist a joke.

    It's the local darts championship. The champion goes up to the oche, and the commentator is ready.

    He throws a treble-top.

    "SIXTY!!"

    Next, a single twenty.

    "EIGHTY!!

    The third dart hits the wire, bounces out, crashes through a nearby window and hits a passing nun right between the eyes.

    "ONE NUN DEAD AND EIGHTY!!!!"

    1. Michael H.F. Wilkinson Silver badge
      Coat

      Re: Can't resist a joke.

      Alternatively, if the last dart hit Otto von Chriek as he was passing by it would be

      "ONE UNDEAD AND EIGHTY!!!!"

      Mine is the one with "The Truth" in the pocket

  6. DrXym

    Kind of too late now

    Google spooked devs as soon as they started talking of separate runtimes and integration into Chrome. I'm sure many developers had flashbacks to the days of VBScript where Microsoft tried to fragment the web by shoving their own scripting language in their own browser.

    Ironically Microsoft seems to be the winner this time around with Typescript. Typescript is a compiler that outputs JS but adds keywords for classes, static typing and modules. So it's familiar to JS (and Actionscript) devs while still adding useful functionality.

    I don't rate JS or TS much as a language (binding and scope rules are a minefield) but sometimes pragmatism trumps idealism. TS has mature tools, thousands of definition files for calling popular JS libraries and has become a mainstay in many projects.

    1. Tom 7

      Re: Kind of too late now

      Oh you mean all those features that were available in JS2 in, what 2002, but for some reason were not allowed into ECMA script?

      Nothing to do with the writers of Actionscript and Typescript being in the standards group for ECMA???

      1. DrXym

        Re: Kind of too late now

        "Nothing to do with the writers of Actionscript and Typescript being in the standards group for ECMA???"

        So you mean this was all a conspiracy and a mere 12 years later they sprung the steel trap shut?

        More likely it was to do with the general craptitude of JS in browsers at the time and concerns about implementing a new radical version of it while still supporting older versions.

  7. Tromos
    WTF?

    JavaScript is too slow and the solution is a new language that compiles into JavaScript???

    1. Robert Grant
      Angel

      You're confused; Google liked Dart because they wanted more speed, but the Dart team decided it wasn't worth it from a browser compatibility point of view. Two different entities with different opinions.

      Another fake irony blasted!

    2. roselan

      these last 3 years, between node, emscripten, asm and multi-step/partial compilation, javascript performance has seen heaps and bounds of performance boost. Not any javascript, mind you. However precompiler/transpiler ouput code that the js compiler like.

      I mean, now you have unreal engine games running in javascript in the browser. This is quite crazy, if you ask me.

      1. JLV
        Happy

        emscripten

        I was nosing around online to see if there was a port of dot/Graphviz to render svg, or at least test dot, online. Turns out there had been such a discussion, someone wanted to port it to js. But someone else just chucked emscripten at its codebase and, presto, online graphviz. Impressive.

  8. Tony Haines

    Can't they do both?

    ...compiler outputs both javascript and dart, and the browser chooses which it prefers.

    That way if dart proves faster, the other browsers can migrate to it when they're ready.

    1. ShaggyDog

      Re: Can't they do both?

      I always assumed that is what Google would do (prefer dart, fallback to js) and simple competitive pressures would mean other browsers having to add a dart vm to run the most demanding web apps or games. Shame, IMO, but dart seems to be stagnating

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like