Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No. Rust is a systems language meant to displace c and c++.

Dart is Google's me-too attempt at creating something which compiles to JavaScript. It borrows heavily from java and generates equally bloated code.

OK, so maybe last sentence is a bit over the top critical, but last I checked, hello world in dart rendered in at 100kb [1] of js and dependencies.

[1] http://lostechies.com/jimmybogard/2011/10/12/the-dart-hello-...



The aim of Dart was really to provide a second VM in browser with a compatibility dart2js compilation mode. It was never intended to always be used with dart2js.

Dart 1.5.1 produces nowhere near that much for the same input, producing just 14KB (see [1]). Yes, arguably still too verbose, but note that much of the overhead is essentially a Dart-compatibility support library, so remains constant as the amount of Dart increases.

[1]: https://gist.github.com/gsnedders/ab101d73bc91d2782e0a


If the Dart team decided to put a lot of effort into it, I bet they could get that down, but to what benefit? The average application isn't a hello world and so most of the code that isn't being pruned is likely system runtime code that most apps need.

I decided to try such an experiment with GWT recently, since the same kind of unfair microbenchmark has been used against it.

I detail how I reduced the hello world from 2205 bytes to 710 bytes here: Th3e Hello World Challenge https://plus.google.com/+RayCromwell/posts/VK8URgZiLbS

What how did I do it? By not registering any global exception handlers, or any async tasks, and arranging for the compiler to be able to optimize away the unused runtime stuff.

But how likely is it that no one wants to catch exceptions and print pretty stack traces? Or to schedule microtasks to run at the end of the event loop?

It's not a realistic test.


Dart is not meant to enable building "hello world" apps though.


>It borrows heavily from java and generates equally bloated code.

I don't mind Java, but I don't see how a) being compared to Java is a negative given the alternative is JavaScript (which as a language is terrible) and b) how Dart borrows heavily from Java.

Re b), there are enough differences between the two (e.g. dart has optional static typing, mixins and js-type closures, and is single-threaded and interpreted) that the similarities are completely superficial.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: