Live data from Hacker News

Dart language

dartlang.org

41–50 of 504 posts

Re: Dart language

#41
post #6

Can anyone explain why I should use this instead of other web programming languages?

From their "technical overview" page http://www.dartlang.org/docs/technical-overview/ :

"Dart will include a rich set of execution environments, libraries, and development tools built to support the language. These tools will enable productive and dynamic development, including edit-and-continue debugging and beyond—up to a style where you program an application outline, run it, and fill in the blanks as you run."

Sounds like a Smalltalk-style debugger running in the browser.

Though it seems these tools aren't actually ready yet: "This is a technology preview, not a product launch" -- http://dartinside.com/2011/live-from-dart-launch/#liveblog-e...

Re: Dart language

#42

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 t…

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

I would guess it's a reference to the optional static typing. There's a growing movement behind static typing and functional programming that resembles the movements behind dynamic typing and OOP of a decade ago...

Re: Dart language

#43

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 t…

Dart doesn't really share much with GWT. The basic language semantics are dynamic, not static. The types are more or assertions and documentation that generate runtime warnings, but do not produce compile time errors that refuse to let the app run at all.

Dart's a lot more like CoffeeScript than Java.

Re: Dart language

#44

Aaaarghhh! It is full of semicolons. Is it really necessary in the 21st century to create a language that terminates lines with semicolons? I am sure I have seen some other languages in the past that get by just fine without them.

Does having semicolons help with minification (which is common practice for sending JavaScript over the web)? Although, thinking about it, replacing ";" with "\n" would be the same number of bytes.

The only (contrived) advantage of using semicolons that I can think of is to avoid potential problems with line wrapping. For example, some mail clients add new lines after 80 characters, which would be more likely to break Dart code than JavaScript.

Re: Dart language

#46
post #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.

From the menu example:

    document.query("#menu").nodes.add(sliderMenu.node);
So, yes, DOM manipulation is there albeit kind of ugly.

Re: Dart language

#47
I was expecting dynamically typed Scala, with ready to go IDE from Google and truck full of apis and tools.

Or a surprise.

Re: Dart language

#48

Aaaarghhh! It is full of semicolons. Is it really necessary in the 21st century to create a language that terminates lines with semicolons? I am sure I have seen some other languages in the past that get by just fine without them.

To be honest though, small syntactical differences like that are something that is meaningful only for novice-to-intermediate level programmers. Semicolons, braces, tabs-vs-spaces - classical examples of bikeshed bickering.

Re: Dart language

#49
Mozilla's Brendan Eich, inventor of JavaScript, on the Dart memo leaked a few weeks ago:

A Dart to JS compiler will never be "decent" compared to having the Dart VM in the browser. Yet I guarantee you that Apple and Microsoft (and Opera and Mozilla, but the first two are enough) will never embed the Dart VM. So "Works best in Chrome" and even "Works only in Chrome" are new norms promulgated intentionally by Google. We see more of this fragmentation every day. As a user of Chrome and Firefox (and Safari), I find it painful to experience, never mind the political bad taste

From here: https://news.ycombinator.com/item?id=2982949

Re: Dart language

#50
post #26

A face-washed JavaScript with classes, interfaces and such stuff. I was expecting something more syntactically close to Go, or at least to Python.

Meanwhile, I've been slowly eliminating my usage of `class` from all of my CoffeeScript code. I've found that my code is much more reusable, far less prone to `this` bugs, easier to reason about, etc. I used to be a huuuge OOP guy, but now I rarely find a use for classes...
Post reply on HN