Live data from Hacker News

Dart 1.0 Is Out

news.dartlang.org

91–100 of 162 posts

Re: Dart 1.0 Is Out

#91
post #14

Earlier quoted context omitted.

It compiles to JavaScript. The VM and dart2js are MIT licensed. It's not the same situation.

And who is responsible for keeping the DartVM/Dart2JS behaviour in sync ? Google being the ONLY committers don't exactly have a motivation to.

Google web developers who want to deploy their apps need to use dart2js. Google web developers need to make sure their apps work in all modern browsers. If the Dart team wants to promote adoption even within Google (and they do) they need to support all modern browsers.

Dartium and dart2js already aren't quite in sync; numeric types work differently for example. But they're close enough that for most apps, you can develop in Dartium and deploy on dart2js and the language differences don't really bother you. The language differences between Dart-in-JavaScript and Dart-in-Dartium are a lot less than the differences between browsers that web developers deal with all the time.

Re: Dart 1.0 Is Out

#92
post #68
post #65

Earlier quoted context omitted.

> In fairness to JavaScript, it is absolutely possible to write very large apps and keep them organized and maintainable. I see it a bit like when Dijkstra wrote "Go To Statement Considered Harmful". I have no doubt a lot of developers at the time objected to it and said "that is wrong, it is possible to write good code using GOTO". Because they probably wrote code using GOTOs and some of that code was probably decen…

In C it is almost customary to use `goto` as poor man's exception handler: you do `goto cleanup` from inside of nested ifs and loops if a fatal error happens and all you need is to clean up what needs cleaning and return an error code. The problem is that `goto` is easy to abuse, and, worse, easy to abuse inadvertently , e.g. you might produce a `goto` into a loop or something like that during refactoring. JavaScript…

It's important to remember that the "goto" Dijkstra is talking about is very different from the "goto" that C programmers use. He's talk about unstructured goto: jumping from the middle of one function to another, or across scopes.

"Goto" as another local flow control construct is relatively innocuous.

Re: Dart 1.0 Is Out

#93
post #85
post #76

Earlier quoted context omitted.

As an alternative, just working on/sponsoring/begging for an asm.js target might be enough to equalize performance.

Not sure asm.js would make sense for something like Dart, since it is mainly intended for things like C and C++ (Dart is a dynamic language, and needs different forms of optimization). However, I think it would be fun to explore that direction! I'd be happy to collaborate with Dart VM people on that.

I think we can be fairly sure that targeting asm.js would degrade performance for a language like Dart.

Re: Dart 1.0 Is Out

#94
post #85

Earlier quoted context omitted.

Not sure asm.js would make sense for something like Dart, since it is mainly intended for things like C and C++ (Dart is a dynamic language, and needs different forms of optimization). However, I think it would be fun to explore that direction! I'd be happy to collaborate with Dart VM people on that.

I think we can be fairly sure that targeting asm.js would degrade performance for a language like Dart.

I suspect you might be right, but I am far from certain - can you elaborate?

My concerns are about things like PICs, but code generation is possible, so replacing functions to change PICs is one way to implement them. This is, I think, how the Graal project does JavaScript and Ruby, and they get very good performance.

Re: Dart 1.0 Is Out

#95
post #59
post #32

Earlier quoted context omitted.

Well, Dart will eventually work best on Chrome because of the Dart VM. There's nothing stopping Mozilla from adding the VM to Firefox, of course. Getting an additional 2x-4x performance boost would be great.

There are at least two problems with adding the Dart VM: 1. Standards. The Dart VM is not part of any web standard, nor part of a spec that has interest from multiple vendors, so it should not be shipped in a standards-compliant browser. This is a matter of principle that most browsers agree on these days, see for example Google's Blink guidelines: http://www.chromium.org/blink#new-features 2. Effort. Adding a new VM…

It was the same story with javascript.

Re: Dart 1.0 Is Out

#96
post #78

Earlier quoted context omitted.

Dart2JS will be the key thing that drives Dart adoption. So, yeah, Google has a motivation to keep it up to date.

Only until there is enough adoption for them to stop caring.

If there is that much adoption then the onus will be on Mozilla, Apple and Microsoft etc to step up and accept the will of web developers. Edit: and push for standardization.

Re: Dart 1.0 Is Out

#97
post #95
post #59

Earlier quoted context omitted.

There are at least two problems with adding the Dart VM: 1. Standards. The Dart VM is not part of any web standard, nor part of a spec that has interest from multiple vendors, so it should not be shipped in a standards-compliant browser. This is a matter of principle that most browsers agree on these days, see for example Google's Blink guidelines: http://www.chromium.org/blink#new-features 2. Effort. Adding a new VM…

It was the same story with javascript.

That's a fair point in that yes, JavaScript was nonstandard when it was first included in a web browser.

But it is an incorrect point in that the field has changed a lot, for the better - most or all browser vendors want to play nicely these days. Even Microsoft is supporting the standards process and implementing WebGL, for example. The principles guiding browser vendors are more like these which Google wrote for Blink:

http://www.chromium.org/blink#new-features

> In practice, we strive to ensure that the features we ship by default have open standards.

That was not the case 18 years ago, but thankfully it is today. 18 years ago it might have been common practice to just ship a new VM in a browser, but to do so today with no regards for the standards process would be unexpected and improper.

Re: Dart 1.0 Is Out

#98
post #78

Earlier quoted context omitted.

Dart2JS will be the key thing that drives Dart adoption. So, yeah, Google has a motivation to keep it up to date.

Only until there is enough adoption for them to stop caring.

If there's enough adoption, then I'd expect other browser developers either to build their own Dart runtimes, or -- since its free -- use or fork Google's.

And, then, sure, Dart2JS stops being important to Google because its unimportant to how Dart code performs on the web. But its unimportant to Google because its unimportant to anyone, since it won't matter to users, either.

Re: Dart 1.0 Is Out

#99
post #59
post #32

Earlier quoted context omitted.

Well, Dart will eventually work best on Chrome because of the Dart VM. There's nothing stopping Mozilla from adding the VM to Firefox, of course. Getting an additional 2x-4x performance boost would be great.

There are at least two problems with adding the Dart VM: 1. Standards. The Dart VM is not part of any web standard, nor part of a spec that has interest from multiple vendors, so it should not be shipped in a standards-compliant browser. This is a matter of principle that most browsers agree on these days, see for example Google's Blink guidelines: http://www.chromium.org/blink#new-features 2. Effort. Adding a new VM…

"The Dart VM is not part of any web standard, nor part of a spec that has interest from multiple vendors"

Which is... exactly the same situation JavaScript was in when Netscape introduced it.

Re: Dart 1.0 Is Out

#100
post #59
post #32

Earlier quoted context omitted.

Well, Dart will eventually work best on Chrome because of the Dart VM. There's nothing stopping Mozilla from adding the VM to Firefox, of course. Getting an additional 2x-4x performance boost would be great.

There are at least two problems with adding the Dart VM: 1. Standards. The Dart VM is not part of any web standard, nor part of a spec that has interest from multiple vendors, so it should not be shipped in a standards-compliant browser. This is a matter of principle that most browsers agree on these days, see for example Google's Blink guidelines: http://www.chromium.org/blink#new-features 2. Effort. Adding a new VM…

> 1. Standards. The Dart VM is not part of any web standard

I can see how many would see that as tail wagging the dog. But I see your point. And I agree it should be part of a standard. However I would imagine (and correct me if I am wrong) it is a lot easier to approve and go through the standard approval if there is already an implementation out there to look at. Standardizing on a hypothetical future feature via a large committee, doesn't work too well.

> 2. Effort.

Here, again, this is not a hypothetical, we haven't proven if it is possible we are just dreaming about adding a VM. Dartium works today. Presumably other would have a bit less work to do but it depends on how DOM interaction differs between them.

EDIT: 2nd part initially completely didn't make sense

Post reply on HN