Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Dart Is Not the Language You Think It Is 312

An anonymous reader writes "Seth Ladd has an excellent write-up of Dart: 'When Dart was originally launched, many developers mistook it for some sort of Java clone. In truth, Dart is inspired by a range of languages such as Smalltalk, Strongtalk, Erlang, C#, and JavaScript. Get past the semicolons and curly braces, and you'll see a terse language without ceremony. ... Dart understands that sometimes you just don’t feel like appeasing a ceremonial type checker. Dart’s inclusion of an optional type system means you can use type annotations when you want, or use dynamic when that’s easier. For example, you can explore a new idea without having to first think about type hierarchies. Just experiment and use var for your types. Once the idea is tested and you’re comfortable with the design, you can add type annotations."
This discussion has been archived. No new comments can be posted.

Dart Is Not the Language You Think It Is

Comments Filter:
  • by Necroman ( 61604 ) on Tuesday May 21, 2013 @07:48PM (#43788901)

    I've been following Dart on and off since it's announcement. I'm still a little skeptical of the language, but I'm a fan of what they want to do. Here are their basic goals:

    • Create a class based (OOP) language for doing browser heavy apps (like GMail).
    • Allow it to inter-op with today's browsers (hence compiling to Javascript)
    • Create a DartVM so the code can run faster than there javascript counter-parts. This also allows for server-side, but this much lower on their priorities.
    • Make the language easy for Java/C++/C# developers to learn.
    • Only work with "the modern web". meaning IE9 and higher.

    There is a lot more to it than this, but it's sort of a beginning. The language still hasn't hit 1.0, so no one is seriously using it (as the language itself was seeing large changes up until recently). Google has not talked about anyone outside of the Dart team itself that is using Dart within Google (they are doing it, it's just not being talked about yet).

    Since 1.0 is expected this summer, you probably won't see many people using it until that milestone is hit. Once 1.0 is hit, people will be more willing to create real products with it, so you can expect to see more about Dart after that. As well, once the DartVM makes its way into Chrome (which will happen sometime after 1.0), you'll probably see a lot of press about the first Google App that is written in Dart.

    It's still early in Dart's life. The only people really seriously using it are people that like learning new languages. Companies and most developers won't touch an in-progress programming language out of fear that syntax and behavior changes will screw them up.

  • by angel'o'sphere ( 80593 ) on Tuesday May 21, 2013 @09:39PM (#43789689) Journal

    C++ implements all this with C features called setjmp and longjmp.

    http://en.wikipedia.org/wiki/Setjmp.h [wikipedia.org]

  • by Pseudonym ( 62607 ) on Tuesday May 21, 2013 @10:00PM (#43789847)

    setjmp and longjmp do many useful things, but stack unwinding is not one of them, and it's far from "easily and automatically". If you're trying to do the same thing as a real exception system, setjmp/longjmp imposes a large maintenance overhead (and significant run-time overhead, but the maintenance overhead is arguably much more important) on your program, even if you never raise an exception.

    Incidentally, I do have a few quibbles with the list you responded to. C programmers do object creation and destruction just fine, it's only exception raising and stack unwinding which requires the manual effort. And RAII is a means, not an end in itself.

  • by H0p313ss ( 811249 ) on Wednesday May 22, 2013 @02:40AM (#43791141)

    Yeah, exactly. What the writeup calls "appeasing a ceremonial type checker" is more properly called "debugging".

    Don't get me wrong, I like the thrill of the chase, the satisfaction of tracking down a really hard bug, as much as anyone. But I like programming even more. Using a well-designed type checker, I can find bugs in my program and convince myself that I'm programming rather than debugging.

    Agreed. The languages I've used the most would be Smalltalk, C++, Javascript and Java (in rough chronological order, some overlaps), two are weak typed two are strong typed.

    After a day grinding out hundreds of lines of productive Java trying to do anything in javascript just makes me want to drown kittens... well perhaps kittens named Brandon Eich. (Sorry Brandon... I've just seen too many sins committed with your language.)

  • Re:Unadvantages! (Score:2, Informative)

    by Anonymous Coward on Wednesday May 22, 2013 @09:24AM (#43793093)

    C has simple, strong type safety.

    No. Try to put this in one file:

    double f(double x) { return x*x; }

    and this in another

    #include <stdio.h>
    int f(int x);
    int main()
      printf("%i\n", f(1));

    Then compile with C and link both files together. The compiler will not complain. The linker will not complain. That's not type safety.

Would you people stop playing these stupid games?!?!?!!!!