Live data from Hacker News

Dart language

dartlang.org

251–260 of 504 posts

Re: Dart language

#251
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?

    someString.append(System.getProperty("line.separator"));
vs

    some_string += "\n"

Edit: Someone's in disagreement with me, so I'll try and clarify. I'd classify boring code as code where the intent gets lost in the syntax/language or other constructs the maintainer of the code doesn't care about but are required anyway.

Trying to open and read a file in Java is probably a better example as the intent (open this file and read the contents) is buried in about 6 lines of boilerplate code

I use Java as an example because in a previous life I used to write it and see this as perfectly acceptable

Re: Dart language

#252
A question to ask yourself: If this had been Microsoft creating an IE10-only language to replace JavaScript, instead of Google, would you feel any differently about Dart?

Re: Dart language

#253
post #26

A face-washed JavaScript with classes, interfaces and such stuff. I was expecting something more syntactically close to Go, or at least to Python.

Meanwhile, I've been slowly eliminating my usage of `class` from all of my CoffeeScript code. I've found that my code is much more reusable, far less prone to `this` bugs, easier to reason about, etc. I used to be a huuuge OOP guy, but now I rarely find a use for classes...

I have used `class` less and less in my Python code, and when I still use it, it is as little more than a struct.

I never use inheritance.

Since I started to do this, my code has become much simpler and cleaner.

Re: Dart language

#254

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

I think this comment gets to the heart of the matter. People want something different. They want a Haskell. How many blog posts about Perlis languages have we seen in the past several months?

Reading these comments I've come across the words: boring, uninspired, underwhelmed...

I couldn't agree more.

JavaScript's prototypal object model can at least keep my attention.

Re: Dart language

#255
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 ();

I'm not familiar with LINQ, but is that roughly equivalent to

    grains.select{|g|
      g.is_a?(Salt) && g.value.blank?
    }.sort{|a,b|
      a.irrelevance  b.irrelevance
    }.first

Re: Dart language

#256
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.

I believe this interpolation difference in Ruby originates from Perl which in turn got it from bash and other UNIX shells. I actually like the fact that Ruby and Perl have so many way to quote a string a lot since I have always hated excessive escaping.

Re: Dart language

#257

This is completely the wrong thing to do. Google should be proposing a standard, open, byte-code compatible, Intermediate Language standard that can run Javascript and in the interim run on Javascript. That is something I could see Mozilla and Apple getting behind. Only once they have actively campaigned for this should they be adding new languages to the browser which fracture the web. I had hoped that Dart would su…

Oddly enough, if in-browser Java had "won", we'd already have such a thing.

True. But in return we would have had to endure 10 years of in-browser Java.

Re: Dart language

#258

Earlier quoted context omitted.

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 ();

I'm not familiar with LINQ, but is that roughly equivalent to grains.select{|g| g.is_a?(Salt) && g.value.blank? }.sort{|a,b| a.irrelevance b.irrelevance }.first

var saltGrains = new List();

foreach (var g in grains) {

    if (g.TypeOf() == "Salt" && g.Value == nothing)

        saltGrains.Add(g);
}

saltGrains.sort(m => m.Value.irellevance);

return saltGrains.First();

or something.

Re: Dart language

#259
I'm really surprised to see all the hate here. It's early yet guys...give them time to hone it a bit.

I'm perfectly willing to live with the Java-like syntax and feel, so long as:

- I can write in the same language on both the client and server side - Solid libraries exist on the server side for interaction with RDBMSes, web services, etc - Good tooling support

Those of you complaining about the syntax...do you honestly think regular javascript is any better? Personally, I loathe javascript's syntax and inconsistencies...if Dart can solve that and give me good server side programming support, I'll sign up. That's the problem with things like Node today...the server side libraries are loosely documented and implemented IMO...it's very much a Wild West environment.

Re: Dart language

#260

Earlier quoted context omitted.

> This looks like Java for Javascript, if that makes any kind of sense. It completely does. And I love that it manages to be completely incoherent with Go, the other "Google Language". That's so symptomatic of what google does on that front.

Weird that a systems language and a web language are different, huh?

If they had taken Javascript (or if you prefer a more coffee-script like syntax) and added Go's best features: interfaces-as-duck-typing, channels as fundamental types, string iteration over runes rather than bytes then they would have had a nice little language.

The only thing I like is underscore for private variables. Go does the opposite (which I think is a safer approach): anything you want public has to start with a capital. It really works—it is both easy to do and easy to read.

Post reply on HN