Live data from Hacker News

Dart language

dartlang.org

191–200 of 504 posts

Re: Dart language

#191
post #181
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…

Also, string interpolation using only double quotes has bothered me in Rails. That was the one feature I saw that they supported, although now that I think about it, Rails probably adopted it as a convention to prevent excessive escaping.

That's Ruby, not Rails. It allows you to influence how your content should be escaped, so you write '\n' instead of "\\n" and '"' instead of "\"", it's actually pretty handy in practice.

Re: Dart language

#192

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…

I think the Dart VM will be a nice target for compilation from other languages. In general it's easier to put a typed language on an untyped runtime than it is to put an untyped language on a typed runtime. Before Google I worked on an academic project that built a small Smalltalk-like VM that was also a compilation target for something that was very close to unthreaded Java. Worked pretty well.

> I think the Dart VM will be a nice target for compilation from other languages.

This would indeed be nice but it seems that google wants to push the language more than the VM. I quite get this because saying "you can now run your favorite language for the browser" seems much much more attractive than saying "look we made programming language 1001 and this is what you people should be using now!".

> In general it's easier to put a typed language on an untyped runtime than it is to put an untyped language on a typed runtime.

I have no knowledge of how one would do this but a lot of dynamically typed languages exist for the (I am assuming) statically typed platforms such as the JVM and CLR now.

Re: Dart language

#193
post #102
post #70

Earlier quoted context omitted.

I love Python. I prefer working without semicolons. But from a new language standpoint, it's not worth dropping them. The ridiculous arguments that come out of it, the programmers who refuse to use the language because of it, they're things that can and should be avoided by using semicolons like most languages. I'll never understand why programmers care so much about this, but hey, that's life.

Programmers care about it because it adds extra noise to your program. If you semantically, and naturally, communicate "end of statement" with a line break to human readers, why should you have to say it again with a semicolon to the compiler? Programming languages should focus on being DRY.

Semicolon makes it possible to do jQuery-style chaining with the least noise. I think frequent-backslash is uglier than always-semicolon.

Re: Dart language

#194
post #102
post #70

Earlier quoted context omitted.

I love Python. I prefer working without semicolons. But from a new language standpoint, it's not worth dropping them. The ridiculous arguments that come out of it, the programmers who refuse to use the language because of it, they're things that can and should be avoided by using semicolons like most languages. I'll never understand why programmers care so much about this, but hey, that's life.

Programmers care about it because it adds extra noise to your program. If you semantically, and naturally, communicate "end of statement" with a line break to human readers, why should you have to say it again with a semicolon to the compiler? Programming languages should focus on being DRY.

I very often use and see "single" line of code flow onto more than one line for readability. So often a line break is definitely not enough.

Re: Dart language

#195

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.

Please make semicolons and braces optional. Unless they are explicitly required for marking blocks and endlines they are just wasted characters to people from prettier languages :-) For those people who come from "ugly" languages like Java you could have a feature in the IDE which auto-inserted (and of course auto-removed) the braces/semicolons so that they felt at home too.

Are there really people that feel like the lack of adding semi-colons is bad? I understand why you want to be able to optionally terminate a line early for terseness but being required too is just more work. But then I also know people who wax on about the meditative aspects of dish washing instead of buying a machine to do it.

Re: Dart language

#196

Earlier quoted context omitted.

Yes please. No semicolons. And please make it look a lot more like CoffeeScript than Java.

Am I in the minority? I madly in love with braces and semicolons. And, madly hate Pascal, Python & Ruby for the absence of them.

[deleted]

Re: Dart language

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

>int bool String Object Why do some types start with lowercase and some with uppercase letter. Why not use a sensible naming convention?

Primitives and objects, it kind of makes sense but I do see your point.

Re: Dart language

#198

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…

I understand the context and still disagree. If Dart is so much better than JavaScript on Chrome and if its Dart->JS engine does a good enough job of creating usable JS on other browsers that developers are willing to commit to using it to write apps then, well, that's too bad for everyone else, isn't it?

Why should Google put the brakes on improving client side development just because it puts other browsers in the uncomfortable position of having to license Dart (for free, since it is OSS and has a liberal patent grant)?

The same would be true if Microsoft created some sort of .NET->JS compiler with their own VM for IE, or if Mozilla did the same with some new language. As long as they bridge to JavaScript, more power to them. Client side web development could certainly use some of the tools that these different language environments could offer and if it kicks off another performance race to get browser-side languages even faster (especially on mobile devices), so much the better for everyone.

I really don't see how there is any downside (to anyone but maybe Brendan Eich) to widespread usage of Dart unless the Dart->JS code proves to be suboptimal, but in that case devs won't use it.

Re: Dart language

#199
Wow guys. Google is not aiming at a next gen Haskell or ML. They are trying to create a less cluttered Java and a stricter, more performant Javascript. Judge a solution in context of the problem it is trying to solve. If they got Simon Peyton Jones to design this it would be somewhat intimidating for your average webdev[no disrespect].

I'm somewhat disappointed that they insist on a 90's C syntax. It's like Python/Ruby/Coffeescript never existed.

C'mon Google, you can do way better...

Re: Dart language

#200
post #144
post #135

Earlier quoted context omitted.

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.

[deleted]
Post reply on HN