Live data from Hacker News

Dart 1.0 Is Out

news.dartlang.org

141–150 of 162 posts

Re: Dart 1.0 Is Out

#141
post #24

Earlier quoted context omitted.

If you are looking for a structured language (for front end dev), Typescript is a better alternative imho. Javascript devs can still read it and it's compatible with any JS library out there. Dart not so much since the semantics are different.You can still interact with JS libs but it's not as straight foward as TS. I tested a number of options (GWT,Haxe,CS,Dart,Opal,Jsx,...),while i'm not a Microsoft fan(by a long s…

I agree with this very much. Dart is a new language; JS is an existing language, improved. Dart actually has horrible semantics in places. Only if x === true will if(x) run.

That's very different from Javascript (and from the untyped-language mainstream) but is it really "horrible"?

The type-checker will give a very clear warning if it catches you putting a non-bool in a conditional context. And make no mistake: the type checker is an important part of the Dart development process.

(One downside of this is that it does push you to working in the -- Eclipse-derived -- DartEditor, which isn't always a wonderful experience. However, the type checker is exposed and available, and there's nothing to prevent it being tightly integrated into other editors or IDEs.)

Re: Dart 1.0 Is Out

#142
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 think the issue is that JS doesn't have strong conventions for how to do that, so you actually need to make good choices that work well with your app. I have no doubt that Dart makes that stuff easier, but there's nothing inherent to JavaScript that makes it unsuitable for larger applications. It…

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

Javascript is the only language you can run on the browser (Dart doesn't change that).

So if Javascript is "GOTO" then dart is: "function NotGoTo() { GOTO; }"

Re: Dart 1.0 Is Out

#143
post #89

Sad to throw away the brilliance of prototypes to go back to single-inheritance classes. uck

Could you explain the brilliance of prototypes? Prototypes in JavaScript are pretty awful, but I've never been sure if that's just the JavaScript implementation (for instance, the lack of a good way to clone an object makes using prototypes in JS more painful than it needs to be), or the concept of prototypes more generally.

Re: Dart 1.0 Is Out

#144
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 think the issue is that JS doesn't have strong conventions for how to do that, so you actually need to make good choices that work well with your app. I have no doubt that Dart makes that stuff easier, but there's nothing inherent to JavaScript that makes it unsuitable for larger applications. It…

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

"If you want to go somewhere, goto is the best way to get there." - Ken Thompson

Re: Dart 1.0 Is Out

#145
post #112

Earlier quoted context omitted.

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.

Yes: structured `goto`, in form of `break` and `continue` is widely used and usually not frowned upon.

Indeed, a labeled break is like a forward goto with the label placed far away from the destination :-)

Re: Dart 1.0 Is Out

#146
post #129
post #127

Earlier quoted context omitted.

Unfortunately, though, this kind of goes against your argument which I understand to be "how dare Google release something that is not standards based". I agree principle with that, _but_ in this case a few posts did show example of technologies that all browser vendors introduces that were outside the spec. > But in recent years, there is growing consensus on the importance of not shipping non-standard things. Other…

I don't follow, why does it go against that line of argument? If someone else did something bad in the past, it doesn't excuse doing something bad in the present. (And as mentioned above, I'm not sure about those examples - while it's very possible some were released before being standardized, I didn't see a link showing that, and they are all being standardized now. Need more info.) Fair point about the limits of th…

> If someone else did something bad in the past [...]

Earlier you mentioned "far past", but this stuff is fairly recent:

Firefox 2 - October 24, 2006

Firefox 3 - June 17, 2008

Firefox 22 - June 25, 2013

> while it's very possible some were released before being standardized

Nothing of this is in ES5.1.

> they are all being standardized now

Yes, just like Dart.

> For example, WebGL was designed through a standards process, and it is great.

No, that's not how it happened. [1]

Experiment by Mozilla - 2006

Implementations by Mozilla and Opera - 2007

WebGL Working Group - 2009

1.0 spec - 2011

And all of this is based on Canvas which is something Apple made up.

Anyhow, you seem to think that this kind of thing is a problem. It's not. This is how the web works. This is how progress is made.

[1] http://en.wikipedia.org/wiki/WebGL#History

Re: Dart 1.0 Is Out

#147
post #30

Earlier quoted context omitted.

JavaScript was also build as proprietary enhancement :)

People don't really remember what the Web looked like back in Netscape Navigator days. Back then IE replicated some quirks from Netscape so websites would look similar.

But does anyone want to return to those days?

Re: Dart 1.0 Is Out

#148
post #138

Earlier quoted context omitted.

Dart is a better Java (that can run in a browser if you want). Go is a better C++.

> Go is a better C++. Only when it gets generics, real enumerations, dynamic loading support, proper dependency management for large scale projects.

It would help a lot if you could point out what you find wrong with those points in Go.

Re: Dart 1.0 Is Out

#149
post #68

Earlier quoted context omitted.

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.

Indeed. Dijkstra was frequently wrong, especially when he made grand sweeping statements. GOTO is a good example, 'GOTO considered harmful' is practically biblical law amongst many programmers, but it's worth remembering that he made that statement in the context of an argument with Donald Knuth. Knuth won: (http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pd...) http://web.archive.org/web/20070927094626/http://pplab.snu.a... See also http://kerneltrap.org/node/553/2131 about goto http://web.archive.org/web/20051128093253/http://kerneltrap....

Re: Dart 1.0 Is Out

#150
post #9

Just waiting for "Works best on Chrome" Silverlight and ActiveX have already shown the usefulness of proprietary enhancements. No thanks.

What exactly is proprietary about it? Browser vendors are free to integrate the VM into their products, and if they don't want to there is dart2js which is acceptable. This isn't even close to the situation presented by Silverlight, ActiveX and I feel like you're being duplicitous by comparing them.

> Browser vendors are free to integrate the VM into their products

No they aren't. Integrating a Google-controlled VM into any software project (for example, Firefox) isn't trivial (you need lots of resources for it) nor is desirable (the technology is driven and controlled by Google).

Post reply on HN