Live data from Hacker News

Dart language

dartlang.org

221–230 of 504 posts

Re: Dart language

#221
post #156

Earlier quoted context omitted.

Agree with parent comment. My opinion, so far: Overall: uninspired. Below what I was expecting. Probably good for Google goals (tooling, migrating developers, etc) The language is somewhat interesting, but unfortunately saddened by an incredibly boring syntax. At this point, I am thinking that they would have been better off just going with the Go language for this. Looks like something good to migrate fleets of java…

What does "boring Java-like syntax" mean? Can anyone show some quick examples of a boring and a not boring syntax?

Requiring a function for a simple print statement, perhaps? The demo breaks when you remove the surrounding main() loop.

Re: Dart language

#222
post #212

Earlier quoted context omitted.

I agree with you about the syntax - I was hoping for something more like Python. Perhaps this is by design, though? Presumably the syntax doesn't look too bad to people who spend all day writing JavaScript (i.e. the target demographic for this language). Presumably some bright spark will eventually write a Python-to-Dart compiler and then we'll all be happy :-)

> I was hoping for something more like Python. Me too! We already have a very readable, simple and elegant language, let's use that. Anyone know why that wouldn't have worked? (Not using the current CPython implementation but maybe the same syntax but with a different (web-only) set of libraries, that is...)

That's almost exactly what coffeescript is.

With Source Mapping in browsers, it also means you'll be able to get a .coffee line in your tracebacks too.

Re: Dart language

#224

Earlier quoted context omitted.

That statement came with no benchmarks or numbers, no knowledge of the Dart VM and it's relative performance to V8, and no knowledge of the Dart to JS compiler and what kinds of optimizations it does. If you run Google's closure compiler on JS, for example, in some cases, it produces a very significant speedup than hand-tuned hand-written JS, so saying "never be decent" is a pretty strong claim to make.

The key part is (...) compared to having the Dart VM in the browser. It seems pretty obvious to me that unless Google fucks up the VM implementation, it'll always be much faster than compiling to JS, which doesn't even implement the same concepts - let alone semantics - of Dart. In fact, if VM is not much faster, why would they have it at all? Being faster than handwritten JS is irrelevant, because the VM will be fas…

> In fact, if VM is not much faster, why would they have it at all?

Google hasn't made dart so we can make our web apps faster. They made dart because there's a lot of java developers at google who believe that its easier to write monolithic javascript applications (GMail, G+, etc) using a language like java.

They believe it enough that they will try to convince others to follow suit.

Re: Dart language

#225
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 have little knowledge of the latest trends in programming languages, but if your example of a good PL theorist is someone who designed LINQ, then I am going to have to take your opinion with a grain.OfType(Salt).Where(m => m.Value.Contains(nothing)).ToList().OrderBy(m => m.irrelevance).FirstOrDefault();

Re: Dart language

#226
post #64

Earlier quoted context omitted.

Prototypes are fine for a language like JavaScript. They keep things simple. I'd prefer that CoffeeScript (and Dart, of course) implemented a decent syntax for prototyping, replacing the JS mess, rather than trying to disguise them as leaky and half-featured classes.

> leaky and half-featured classes. This is a common willful misconception. CoffeeScript classes are isomorphic to JavaScript prototypes -- the do precisely the same thing. In addition, there is a shorthand syntax for prototyping objects, if that's more your style: Dog = -> ... Dog::bark = -> ... Dog::run = -> ... Note that the above will produce the same result as: class Dog bark: -> ... run: -> ...

I didn't mean that CoffeeScript classes don't cover prototypes —but the other way around: prototypes can't implement the whole typical class abstraction (encapsulation, etc.). So I think CoffeeScript would do better implementing a completely new syntactic abstraction over prototyping that fix all the JavaScript awkward ambiguities than adapting classes to prototypes. But it's still OK, I like and use CS classes.

Re: Dart language

#227
post #187

My hopes were high, but the more read about it, the more it started to look like Java: class Foo implements Comparable Observable Deniable ... Why not have interfaces like in Go, where you just define a set of methods and all classes having the methods will automatically implement the interface. Collection HashMap HashSet LinkedHashMap List Map Set Why not just Array and Hash? And what's up with the whole generics th…

There's only one set of Rob Pikes and Ken Thompsons on this planet :-/

Re: Dart language

#229

Earlier quoted context omitted.

> Agreed. I didn't say you couldn't get better at all, just not much better. I strongly disagree, it makes away with a keyword and magical syntax, that is much better. > Making a new language is crazy, especially if you're aiming for widespread adoption. That's not what I'm saying, I like new languages, and I like interesting new languages, but it pains me to see you defend (or even work on?) Dart, which so far looks…

Well to be fair, the language it is replacing for the most part works, it's mostly just patching up problems: ability to optimize for startup performance, ability to program in the large, and ability to write tools easily (IDEs, etc) Most new programming languages are really just variations on those that came before them. You've got you're LISP derived, your Forth/Stack derived, your APL derived, your ML derived, etc…

> Well to be fair, the language it is replacing for the most part works

They clearly disagree, since instead of taking part of cleanup/improvement efforts (e.g. Harmony) they decided to build a brand new language from scratch.

> Here I think is where Dart hopes to excel -- make a JS-like replacement that supports a better runtime and tools story.

I fail to see why that would happen, from what I've seen so far there's little in Dart which is a significant improvement for runtimes. And as far as tooling goes... well Google's history means they're unlikely to be those handling that, who's going to build tooling for Dart, and why would they have any reason to make that investment instead of improving their JS support further, or adding CoffeeScript support?

Re: Dart language

#230

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.

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.

Personally I don't even have the tolerance for braces. You're already indicating blocks via indentation.

- Requiring a redundant mechanism to mark blocks

- Possible introducing situations where code looks differently than how it executes

is all very mid-90s. python was the first to fix this, but yaml and coffescript do to. In particular, Dart will have to compete with mindshare from .coffee, so at least should be better than that.

Post reply on HN