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."
Understanding Dart's goals (Score:5, Informative)
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:
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.
Re:The proliferation of computer languages (Score:4, Informative)
C++ implements all this with C features called setjmp and longjmp.
http://en.wikipedia.org/wiki/Setjmp.h [wikipedia.org]
Re:The proliferation of computer languages (Score:5, Informative)
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.
Re:There are two kinds of programming languages... (Score:3, Informative)
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)
No. Try to put this in one file:
and this in another
Then compile with C and link both files together. The compiler will not complain. The linker will not complain. That's not type safety.