Slashdot Mirror


Will Google's Dart Language Replace Javascript? (Video)

Seth Ladd, Google Web engineer and Chrome Developer Advocate, is today's interviewee. He's talking about Dart, which Wikipedia says is 'an open-source Web programming language developed by Google.' The Wikipedia article goes on to say Dart was unveiled at the GOTO conference in Aarhus, October 10–12, 2011, and that the goal of Dart is 'ultimately to replace JavaScript as the lingua franca of web development on the open web platform.' A bold aim, indeed. Last month (June, 2014), InfoWorld ran an article by Paul Krill headlined, Google's Go language on the rise, but Dart is stalling. Seth Ladd, unlike Paul Krill, is obviously rah-rah about Dart -- which is as it should be, since that's his job -- and seems to think it has a growing community and a strong place in the future of Web programming. For more about Dart, scroll down to watch Tim Lord's video interview with Seth -- or read the transcript, if you prefer. (Alternate Video Link)

29 of 180 comments (clear)

  1. Here's what I think... by Anonymous Coward · · Score: 5, Insightful

    No.

  2. Can we get .... by PPH · · Score: 4, Insightful

    ... a 'Tower of Babel' icon for articles about yet another new programming language?

    --
    Have gnu, will travel.
    1. Re:Can we get .... by ArhcAngel · · Score: 2, Funny

      And clicking the icon takes you to 927

      --
      "A person is smart. People are dumb, panicky dangerous animals and you know it." - K
  3. Bertridge law of headlines by balaband · · Score: 4, Interesting

    No

  4. Re:No by ShanghaiBill · · Score: 5, Informative

    Unless they can magically add Dart capabilities to all the web-capable devices already out there as well as current and future competitors devices, the answer is no.

    There is already a source-to-source compiler. So you can write in Dart, and then convert your Dart program to Javascript. Then your server can deliver either Dart or JS depending on the client browser's capability.

  5. Not that much better than javascript by ewibble · · Score: 5, Insightful

    I really wanted to use dart, I liked the fact it had types, but once I tried using it found out types where optional, and there was no way to make them required. So knowing programmers/people in general are lazy it will degenerate into no types at all. I don't mind having untyped variables as long as you are explicit about it, but dart is the other way round.

    I think the web needs a statically typed language since webs apps are growing in size, having types allows for greater readability and ease of refactoring that untyped languages just don't provide. Dart is just not it.

  6. Re:No by Anonymous Coward · · Score: 2, Insightful

    If you can convert Dart to Javascript then I don't get the point of Dart.

  7. Re:No by Lained · · Score: 2

    Simple, not causing disruption while people change the programming language (or start programming). If I had to wait for all browsers to support it, might as well not change at all. For change to happen needs to exist critical mass, Google just removed that from the equation.

  8. Re:No by ShanghaiBill · · Score: 5, Insightful

    If you can convert Dart to Javascript then I don't get the point of Dart.

    You can convert A to B, where A and B are any Turing complete computer languages. So, for instance, JavaScript can be converted to PDP-11 assembly language which can be converted to Python which can be converted to C++. The main reasons to use one language over another are performance and the ability to express the algorithm clearly. Dart is (slightly) faster than JavaScript (since fewer type conversions and symbol lookups need to be done at runtime). But the main advantages are that it has better scoping and is more strongly typed, including structures and classes. This also means it is more reliable since more problems can be detected by static analysis tools, and runtime checks can be more rigorous.

  9. Re:It would need to be submitted to a standards bo by Anonymous Coward · · Score: 5, Informative

    Dart would need to be submitted to an independent standards body and be royalty and patent free

    standard: http://developers.slashdot.org/story/13/12/14/2047248/googles-dart-becomes-ecmas-dart
    royalties: http://www.ecma-international.org/memento/TC52.htm
    license: http://opensource.org/licenses/BSD-3-Clause

    STFU already

  10. Re:No by jb_nizet · · Score: 2

    If you can convert C to assembler, I don't get the point of C. If you can convert assembler to machine code, I don't get the point of assembler. The point of Dart is to provide a better, more productive, safer way to develop code. And frankly, I have not written any line of Dart, but JavaScript is so badly designed that it really needs a replacement.

  11. Re:It would need to be submitted to a standards bo by jb_nizet · · Score: 2

    Dart is already being made an ECMA standard, just like JavaScript: http://www.ecma-international....

  12. Comment removed by account_deleted · · Score: 2

    Comment removed based on user account deletion

  13. Re:No by BitZtream · · Score: 2, Informative

    Both JavaScript and Dart are strongly typed

    Someone has no idea what strongly typed means ...

    and by someone, I mean you.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  14. Re:No by znrt · · Score: 2

    this also means it is more reliable since more problems can be detected by static analysis tools

    actually, it means you can employ unreliable programmers and think you can get away with it because your reports are green all over. odds are you won't.

    static analysis tells if code is wrong. it will never tell if code is right. it's just a tool to assist in early improvement and by no means a substitute for reviews and testing. review and testing do add reliability. static analysis doesn't. it's just convenient, but you could do perfectly without, provided you test and review.

  15. Re:No by rubycodez · · Score: 3, Insightful

    No, I think a bad car analogy would be more helpful.

    "If you can bore out the cylinders and hand fit bigger pistons and crank on the 1.4 Liter model to get a 1.6 Liter engine, why buy the 1.6L model"

  16. God please... by aeschinesthesocratic · · Score: 2

    Anything that can rescue me from Javascript.

    1. Re:God please... by narcc · · Score: 2, Insightful

      A simple solution, which I'm sure you've overlooked, would be to try learning the language.

      It's amazing how few people bother, even after using the language for years.

    2. Re:God please... by narcc · · Score: 2

      Yeah, fortunately that is being corrected in ES6. You don't really need to use require.js (it is awful!) though. I've been able to avoid it and similar solutions other ways, depending on the project.

      As for the object model, it's undeniably superior. Google "classical vs prototypal inheritance" for a bunch of articles and (informed) discussions. Once you get a handle on it, you'll be amazed at how much effort it ultimately saves you. (Believe it or not, it's significantly simpler than the classical approach, and far more flexible.)

      Would you recommend any books for learning javascript at a deeper level?

      Not really. Crockford's book is okay, but far from perfect -- same with Flanagan's JavaScript: The Definitive Guide. They're probably the best of a bad bunch.

      You really do have to toss out pretty much everything you know and start from scratch. If you try to use all those techniques you're used to from Java, you're going to pull your hair out. As an added bonus, you'll want to strangle Brendan Eich if you try to treat it like Lisp!

      It's a whole different animal. My advice? Avoid new and constructor functions to shake off some of those old classical OO habits. Spend some time reading about prototype-based programming and event driven design (a good start there is decoupling with events). Your ACM DL subscription will pay for itself in cash saved in therapy.

      Also, do you think Java is really hellish?

      That may be a bit of an exaggeration, but I really don't care for it. Maybe I've just suffered through too much bad Java code? Still, I find it tedious.

  17. Re:No by Waffle+Iron · · Score: 2, Informative

    You might want to look in the mirror.

    Scripting languages usually feature dynamic, strong typing. (The runtime always knows exactly what type its dealing with.)

    Most compiled languages have static, strong typing. C is somewhat of an exception, being relatively weakly typed. (It's easy to make all sorts of bizarre type casts, sometimes implicitely.)

    A few languages are very weakly typed, such as Forth.

  18. Re:No by ShanghaiBill · · Score: 2

    review and testing do add reliability. static analysis doesn't.

    If you have 100 hours available for testing, you can use static analysis to find 90% of the bugs and spend the rest of your time on the 10% that require deeper insight. Or you can waste 90% of your time being a human compiler, manually cross-checking symbols. Which is going to result in more reliable software?

  19. Re:No by Hewligan · · Score: 2

    If you have 100 hours available for testing, you can use static analysis to find 90% of the bugs and spend the rest of your time on the 10% that require deeper insight. Or you can waste 90% of your time being a human compiler, manually cross-checking symbols. Which is going to result in more reliable software?

    That assumes that:

    • 1) Static analysis will find enough problems to save 90% of your testing time
    • 2) There is no additional cost in development time in manually handling all type conversions

    And there are a lot of reasons to believe that neither of those are true.

    --

    "If God created us in his own image, we have more than reciprocated"

  20. Comment removed by account_deleted · · Score: 4, Funny

    Comment removed based on user account deletion

  21. Comment removed by account_deleted · · Score: 2

    Comment removed based on user account deletion

  22. Dart is an ECMA standard by MochaMan · · Score: 3, Insightful

    Dart was submitted for ECMA standardization early this year and is now ECMA-408.
    [Disclaimer: I work on the Dart team]

    1. Re:Dart is an ECMA standard by MochaMan · · Score: 3, Insightful

      Also, to address the license/patent issues, Dart is provided under a BSD-like license and includes a patent grant.

  23. Re:Depends on Microsoft by iamacat · · Score: 2

    More like the dinosaur in the room. Nobody cares about IE anymore. If Chrome, Safari and Firefox adopt a standard, it's a done deal.

  24. Re:Depends on Microsoft by kiddygrinder · · Score: 2

    i wish that were true, IE still has enough marketshare to make it a pain in the arse for anyone developing web apps for businesses, hell i was pretty pumped when we stopped supporting IE7 *this year*

    --
    This is a joke. I am joking. Joke joke joke.
  25. Re:No by angel'o'sphere · · Score: 2

    Of course it does. (... A Strong Typed language does ...)

    The point about "strong types" is that you can make hard assumptions about the data behind the variable when you access it.

    Type coercions are in fact a bit wild in JavaScript, but nevertheless it is strong typed. Or is there a way to crash the VM by abusing types? Certainly not ...

    Perhaps instead of insisting that JavaScript "is not strong typed" you should read up what the opposite is: weak typed. And then compare that with javaScripts type system ... just an idea.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.