Live data from Hacker News

Dart language

dartlang.org

141–150 of 504 posts

Re: Dart language

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

CoffeeScript basically simplifies (and does a pretty good job, imo) existing JavaScript language features. Whereas, Dart adds classes and interfaces and a few other neat things. Admittedly, however, I do cringe whenever I see things like x.compareTo(y) or X x = new X();

Classes, types, better syntax - it's all available in JavaScript today, in it's various 'forms' (CoffeeScript, Mootools, Closure, etc.). Dart isn't a bad language, it just doesn't bring anything exciting to the table (or I fail to see it). Seems like it's ECMAScript 5 but early-bound and with Java syntax. And it runs only on browsers that already support ES5 - this one is really underwhelming.

Re: Dart language

#142

Earlier quoted context omitted.

This is not a product launch.

The lack of browser support implies architectural choices that will always make old browsers lag behind. It means that the generated JS uses modern JS features. If it would be easy to support older browsers, they would've done so already - at least to some extent. The fact that it compiles only to JS for the very latest versions of a small number of browsers gives me the impression that a lot of language/compilation…

> It means that the generated JS uses modern JS features.

I believe it compiles to ES 3, which is isn't exactly "modern JS features". IE6 is ten years old. At some point, you've gotta cut the cord!

Re: Dart language

#143
post #85
post #65

From whatever little I see, I am already hating it :-) This looks like Java for Javascript, if that makes any kind of sense. We are in the year 2011, PL design has progressed so much since 1990 that such an anachronism is unpardonable. I sincerely wish that companies like Google focus on hiring the right kind of person for designing programming languages. What is frustrating is that there are so many people who can d…

I've got to say, I'm looking at it and thinking "That's it?". It looks embarrassingly like C# to me. Other than that: it's got coffeescript's fast initializer syntax, but it's not as concise. It's got types but AFAICT no type inference. No destructuring either. Only thing I can see it's really got going for it is some basic types which could have been provided as a standard Javascript library (and probably will becom…

> AFAICT no type inference.

Not yet.

> No destructuring either.

There's a proposal floating around for pattern-matching that would address that too.

This is still early days for the language, so there's a lot left to be done.

Re: Dart language

#144
post #135
post #55

Earlier quoted context omitted.

No, they're not – nor is tabs-vs-spaces (convention) in the same category as semicolons (syntax). It's ergonomics; less superfluous entities and boilerplate makes it easier to express ideas.

Awesome, your comment is a perfect epitome of the point I was making :) Convention/syntax is completely orthogonal to that point - that point being that experienced programmers don't notice the semicolons, or braces vs 'End If' (OK I realize I'm threading on thin ice with that one...) - once one reaches a certain fluency in programming and reading code, one transcends minute details like that. It's like learning how…

Bullshit elitist crap.

No one can argue with you because you just claim knowledge superiority that can't be confirmed or denied.

People care about this stuff, I don't care if you don't, if other people do, then it's an issue.

Re: Dart language

#145
post #65

From whatever little I see, I am already hating it :-) This looks like Java for Javascript, if that makes any kind of sense. We are in the year 2011, PL design has progressed so much since 1990 that such an anachronism is unpardonable. I sincerely wish that companies like Google focus on hiring the right kind of person for designing programming languages. What is frustrating is that there are so many people who can d…

> Please try and hire people like Oleg Kiselyov, Simon Marlow, Erik Meijer

All brilliant people, but you have to remember that not everyone thinks types are all that matters. I like type systems, but the majority of the world's shipped code was written in languages with unsound type systems.

Re: Dart language

#146

Earlier quoted context omitted.

The language isn't done yet. Now is the time to let us know if you want semicolons to go away. I know some of us on the team do too, but public interest will help a lot.

Where's the best place to lodge our complaints? I'm fine with the semicolons, but I'm not too keen on using underscore-starting identifiers to determine what is public and what is private.

The misc mailing list is the (strangely named) main one: https://groups.google.com/a/dartlang.org/group/misc/topics. Join and fire away.

> I'm not too keen on using underscore-starting identifiers to determine what is public and what is private.

That's also been discussed. It has more going for it than may be at first apparent, but it has detractors too.

Re: Dart language

#147
post #120
post #65

From whatever little I see, I am already hating it :-) This looks like Java for Javascript, if that makes any kind of sense. We are in the year 2011, PL design has progressed so much since 1990 that such an anachronism is unpardonable. I sincerely wish that companies like Google focus on hiring the right kind of person for designing programming languages. What is frustrating is that there are so many people who can d…

Could you enumerate what actually made you hate it? Familiarity is not necessarily a bad thing, and it seems it was one of the main goals of the language.

This http://www.dartlang.org/docs/technical-overview/index.html

A delightfully blank page :-) Yes it mentions classes, interfaces, optional types, libraries, tools, structured yet flexible language. But all of these are a given. Is there nothing else?

What about Generics, Covariance/Contravariance ? Type inference? Odersky thinks type inference in the presence of subtyping is untenable. Is it the same here? Are interfaces linearized as in Scala? What about immutability? It might be too much to ask for rank-2 polymorphism and Haskellish Type Classes but what about support for delimited continuations? Let me guess, these aren't "design goals". All I am saying is this isn't 1990 either.

Re: Dart language

#148

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…

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 masse, then suddenly a chunk of the web "works best in Google Chrome", and every other browser manufacturer is put into a very, very awkward position. They can do nothing, in which case their continued relevance depends on Google continuing to ship the Dart → JS compiler (and diminishes as users switch to Chrome). They can license the Dart VM from Google, in which case their continued relevance depends on Google continuing to license the VM and we have another large chunk of the Web based on a single binary monoculture (which worked so well for Flash!). Or, they can try to develop their own Dart VM, in which case they'll be eternally chasing the tail-lights of Google's VM, kept behind by Google's head-start and Google's engineering power. None of those options is very pleasant, in the long run, for anybody who doesn't own Google stock.

As Brendan's original comment points out, this choice is not unique to Dart. Currently browser makers have picked option 3 ("write our own") to deal with V8, option 2 ("licence Google's implementation") to deal with WebM, and so far option 1 ("ignore it") to deal with SPDY.

Under the carefully-managed tension of ECMA, the ECMAScript standard has become a much more practical language to develop in directly, and to target from higher-level languages — and with the agreement of all the major browser vendors including Google. It's not immediately obvious that a project like Dart is even needed; even if it is a major technical advance, it's a political regression.

Re: Dart language

#149
The one thing I don't understand is why people work on new languages for the browser instead of giving us a platform (virtual machine / intermediate representation, whatever) to implement languages against.

I mean here in this thread we are already seeing it. Some people like semicolons, some people don't. Some people like a prototype based object system, some people like a class based system. And on and on.

I think what would really benefit us is a platform (like a JVM for the browser with a great API replacing the dom) where people could implement languages against. we would get

1) A lot of competition of languages (see what is happening on the JVM right now... Clojure, Scala, Groovy ... you name it), hopefully giving us better languages. Javascript has its strenghts but could you imagine that in such an environment a language that doesn't allow you to test whether or not something is a string would make it very long?

2) People could make their choice and be happy. Then you can program the server and the client in the same language, which is pretty much the main argument for server-side javascript.

Let the languages compete instead of giving us one and now another language for the platform!

Re: Dart language

#150

Earlier quoted context omitted.

Why didn't they go a bit further and have type inference? They proved already with Go that you can have type inference in a language and still have a fairly light/dynamic feel.

Type inference is a tooling feature, not a language feature for Dart. The tools can do some type inference now, and more may be added later. At the very least, I personally really hope we get fully inferred local variables.

The language could require that inferred types are consistent.

   a = 1
   a = "1"; // error
Post reply on HN