Live data from Hacker News

Dart language

dartlang.org

31–40 of 504 posts

Re: Dart language

#31

New MIME type "application/dart"... I suspect that Google Chrome will embed a Dart Runtime when it gets stable, that will be very interesting; I'm not sure if it's a good or a bad thing though.

OTOH it's not that uncommon these days, especially when these transpiled-to-js languages want to run without being translated ahead of time (though usually in production you would want to do that offline)...text/coffeescript, text/traceur, text/es-harmony, etc etc

Yeah, but I don't think any of these mime-types represent any threat for today's Javascript. OTOH Dart(or Dash)'s sponsor already gave us some clues of that their intentions are. I quote https://gist.github.com/1208618 "Push for Dash to become an open standard and be adopted by other browsers. Developers using Dash tooling will be able to use a cross-compiler to target Javascript for browsers that do not support Dash natively." again, it says "target Javascript for browsers that do not support Dash natively [for now]."

Re: Dart language

#32

I don't understand this. The only thing different here is the async handling. Why would anyone want to switch?

Switch from where?

If this were as commonly supported (and as performant) as JavaScript, and if, as I expect, this allows DOM manipulation, I would prefer it over it, if only for the strong typing.

Also, I haven't read the spec yet, but I would expect the 'VM' to run Dalvik code. If so, this will make it easier to port your web app to Android.

Re: Dart language

#33
A language that compiles to JavaScript really needs better browser support. Decent web apps use feature detection to provide graceful degradation for browsers from the stone age. Dart breaks this by making it impossible to run any code at all.

I mean, "IE9 support coming soon!", what the hell? What about IE6? This isn't a CSS style or an animation library we're talking about.

Re: Dart language

#36

New MIME type "application/dart"... I suspect that Google Chrome will embed a Dart Runtime when it gets stable, that will be very interesting; I'm not sure if it's a good or a bad thing though.

Well... http://blog.chromium.org/2011/10/dart-language-for-structure... "The Dart VM is not currently integrated in Chrome but we plan to explore this option."

Re: Dart language

#37
If you're going to go to the trouble of creating a JavaScript replacement, making something more like Java is the wrong way to go IMO. CoffeeScript is a lot more palatable.

Re: Dart language

#38
Is this effectively GWT 3.0?

The project page is very unclear, so I ended up on Wikipedia instead. Wikipedia actually has a leaked memo that seems to do a really good job describing the purpose of the language.

Specifically, the language is meant for three environments: server-side, compiled to JavaScript client-side, and fast native client-side once there is browser support. (The main goal is better performance on the client-side, which is deemed to be very difficult with JavaScript.)

However, the language looks so Java-like, one wonders why they didn't just use Java and extend GWT with a native Java client in Chrome. Did it just not make sense to bet the farm on Java when Oracle controls it?

Also, what does the "structured" in "structured web programming" mean?

Re: Dart language

#39
Probably the biggest difference between JS and whatever revision to it you like, and Dart, is that dart is early-bound. That means, you can't change the list of methods or fields present on an object at runtime.

It doesn't really make sense to ask "Why should I switch from a language I already love?" If you're already productive and love what you're using, then you should probably keep using it.

There are people who want a language that is more modular, scales better than JS for programming in the large, for IDE tooling, or ahead of time compilation, etc. Take a look at the Dart spreadsheet Total for example (https://code.google.com/p/dart/source/browse/branches/bleedi...) I find this code a lot cleaner than JS versions I've seen.

Re: Dart language

#40
VM snapshots for fast startup are potentially nice. But what's the format going to be like? Any realistic chance this will work with multiple browsers? Would need to be something closer to Java serialization than LISP-ish VM imaging.
Post reply on HN