Live data from Hacker News

Dart language

dartlang.org

261–270 of 504 posts

Re: Dart language

#261
post #238

Earlier quoted context omitted.

Do you have a specific criticism of Linq, or suggestions to how it could have been designed better?

Yes, it requires a wide-screen monitor. I don't think I can answer the other question as I don't see any value in it. Turning loops and so on into a giant, inflexible (unless you want two wide-screen monitors) daisy-chain of methods does not improve the readability or maintainability of code. It also encourages programmers to perform actions that should otherwise be in "repository" classes, in inappropriate places. T…

Well, if your example were meant seriously, it is needlessly verbose. ToList is not necessary in this context, and the type arguments to ToList and FirstOrDefault are not necessary since they can be inferred. And anyway, you can just insert line breaks if you think the chain is too long. So:

    grain.OfType()
          .Where(m => m.Value.Contains(nothing))
          .OrderBy(m => m.irrelevance)
          .FirstOrDefault();
I don't really get your verbosity criticism, sine any alternative I can think of (eg. using for loops) is much more verbose.

Re: Dart language

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

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 :-)

When you're trying to change things, it's best to appeal to the early adopters and to do give them a real reason to switch. Making it look the same and appealing to the same "user base" won't work, because then they might find little reason to switch in the first place.

Re: Dart language

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

In Dart, you can often create objects directly from an interface, instead of having to find a class that implements that interface What?? Why to blur the concepts of classes with interfaces and introduce a quirk? Beauty comes from simplicity and symmetry Sounds like Java's anonymous classes. Quite a useful feature, actually.

Sounds like Java's anonymous classes. Quite a useful feature, actually.

It's only useful because Java lacks first class functions and syntax for lambdas. This is the single most irritating thing about Java to me. When this is fixed with the release of 8, the only thing Java will be missing is a really good implementation of persistent data structures a la Clojure.

Re: Dart language

#264
post #72

class Sunflower { static void main() { new Sunflower(); } No thank you! I would rather stay with prototype objects.

Not sure exactly what your problem is since that code won't even compile

It's from the documentation http://www.dartlang.org/samples/sunflower/index.html ...

Re: Dart language

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

Actually, you would write that query as:

    var q = from m in grains.OfType()
            where m.Value.Contains(null)
            orderby m.irrelevance
            select m;

    return q.FirstOrDefault();
which fits in 80 characters on one screen. From this post and your reply, it seems like the your complaint is that LINQ is hard to understand if you write it poorly. But that's true of most programming.

Re: Dart language

#268
Hmm.

print('${(1print('${(1print('${(1print('${(1(I've used x instead of star here as the latter does not display on HN.)

This is completely nonsensical.

Re: Dart language

#269

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

> That's the problem with things like Node today...the server side libraries are loosely documented and implemented

Why would different syntax or explicit types change that?

I don't think you have to replace JS to get better server-side libraries, and better language doesn't automatically give you better libraries and documentation.

Re: Dart language

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

Type are indeed anti-modular - types create huge amounts of coupling across multiple module boundaries in ways that are not easy to wrap up, to componentize, if you will. If you create a module A, but the interface of that module (functions, classes, whatever you might have put in it) uses types from modules B and C, is it not anti-modular?
Post reply on HN