Live data from Hacker News

Dart language

dartlang.org

291–300 of 504 posts

Re: Dart language

#291
It seems to be very misguiding when designers of some new programming language are heavily biased with some business needs or platform selection.

Programming language is not just a technology. It's a way of communicating my thoughts. I don't want to think and write (and read!) in just an _efficient_ language.

Re: Dart language

#293
I don't speak for the team but I believe I can add some perspective.

Think of it this way: what is GWT? GWT os compiling Java, a statically typed language, into Javascript. If you've used GWT you'll know that particularly early on there was a lot of friction. What's simple in Javascript with anonymous objects and duck typing doesn't quite gel with Java so you've had to do things like use JSNI for edge cases.

Google has some incredibly large and ocmplex JS apps (eg GMail). While GMail isn't written in GWT, GWT is aimed at that kind of application with deferred binding and the benefits of static type analysis.

What if you took that expertise (of GWT and static type analysis in producing Javascript) to produce a language that could run on the server, run in the browser (for browsers that support that) and compile to Javascript (for browsers that don't)?

The last point is particular is key to driving adoption as no one is going to develop only for Chrome.

I see it as no surprise the syntax is Java-like. I fully expect sometime soon to see a JVM implementation that will then leverage all the existing Java libraries.

In that context (IMHO) it makes a lot more sense. It might not be solving the problems you're interested in but it is definitely solving a particular set of problems.

Re: Dart language

#295

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. W…

What Brendan is missing is that the contest is not closed between JavaScript and Dart. The elephant in the room is the huge and growing mobile space where ObjectiveC and Java rule. It's not about "Works only in Chrome", it's about "Works only on iOS/Android".

Re: Dart language

#296
post #3

The "hello world" example is incredibly uninformative. What does that have to do with "structured web programming"? Where is this printed out on a web page? Does the console output there correspond to the html output? Or some other console?

Yeah, exactly. This "hello world" uses a "print" function. What would such a print function do in a normal web app? Write to the console or something?

Re: Dart language

#297
post #268

Hmm. print('${(1 print('${(1 print('${(1 print('${(1 (I've used x instead of star here as the latter does not display on HN.) This is completely nonsensical.

It has the same numeric semantics as Javascript. Javascript does not have a 64-bit integer.

Re: Dart language

#298

Earlier quoted context omitted.

I disagree with his premise. The Dart to JS compiler doesn't have to be "decent" compared to having the Dart VM in the browser to be useful in a world where other browsers don't use the Dart VM, it merely has to be "decent" compared to handcrafted JavaScript performing the same task in another browser. If direct Dart code runs faster than JavaScript on Chrome, that's a nice bonus, but if it runs as well as similar co…

I think you have missed the context of his remarks; perhaps I should have pasted more from the original post. You seem to be talking about "what is necessary for Dart to be a viable Web content language", while (I believe) Brendan is talking about "what are the consequences if Dart becomes a viable Web content language". If the Dart → JS compiler produces "good enough" results, and web authors wind up adopting it en…

The points you're using to substantiate your argument are not really in line with the facts. Many browsers broadly share a single implementation for huge chunks of the web. Examples off the top of my head include NSS, WebGL, LibPNG, LibJPEG, and WebM. And it's inaccurate to claim WebM is "licensed" from Google; that's no more true than claiming that NSS is "licensed" from Mozilla. Both are open source projects accepting third-party contributions. People can happily use the code as is, contribute to changing it, or simply fork it off.

Finally, you seem to have missed the fact that Mozilla is already working on an experimentatl implementation of SPDY in Firefox: http://bitsup.blogspot.com/2011/09/spdy-what-i-like-about-yo...

Re: Dart language

#299
post #274

Earlier quoted context omitted.

Ruby tip: Instead of .sort you can use .sort_by. grains.select{|g| g.is_a?(Salt) && g.value.nil? }.sort_by(&:irrelevance).first Edit: Changed from blank? to nil? since that is probably closer to nothing in C#.

thanks. I've been writing Ruby for a few years now and I never knew about sort_by. Looks like is works in 1.8 too, but without the &: syntax sort_by{|g|g.irrelevance} source: http://www.ruby-doc.org/core-1.9.2/Enumerable.html#method-i-...

I actually believe the &:symbol syntax was added in 1.8.7 since I am 100% positive we use that in our codebase which still has not been ported to 1.9.

  $ ruby -e 'puts VERSION; p ["10", "2", "3"].sort_by(&:to_i)'
  1.8.7
  ["2", "3", "10"]

Re: Dart language

#300

Earlier quoted context omitted.

A good development environment is something where you could really differentiate yourselves, and I guess you could very easily integrate introspection and analysis features into chrome to help with it. I've been thinking for years that if I ever were to develop a new language, I would start from developer usability first - I think there is much more to innovate there than in the core language features, nowadays. Deve…

Certainly feasible: Smalltalk debuggers do this. And Smalltalkers (allegedly) use a workflow just like you describe.

I read about this, and even tried downloading squeak once, but didn't find it very compelling. I admit that I might not have given it the time it needed, though...
Post reply on HN