Live data from Hacker News

Dart language

dartlang.org

241–250 of 504 posts

Re: Dart language

#241
post #139
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…

Sorry man, accidental downvote. It was actually a +1. I agree with you, the first impact with the language is terrible, the syntax is too reminiscent of Java. It seems that at Google Java is popular for web apps (GWT, Closure, ...). This must have had an influence. I still fail to see what are the improvements over Javascript (while they managed to get the syntax worse ). I guess a concurrency model, optional static…

As I'm reading through the tutorial, it seems to me that it doesn't even have optional static typing. The tutorial claims:

> Types can help you write and maintain your code, but they don't change how Dart programs behave.

That, in my opinion, is not a type system, it's a documentation system. Writing

  String a = 1;
should crash the program/produce a runtime error in a language with (optional) static type system. In Dart, in only produces a compile time warning.

Re: Dart language

#242
Pretty disappointed with the lack of risk with this. Conceptually seemed like something with a ton of potential, but the minute I saw the tutorial shoehorning the worst of Java and JavaScript into something new, it was a non starter for me...better being insulated writing CoffeeScript a layer up and waiting for a compiler.

Things I've noticed so far that I don't like: get/set proliferation, semicolons, braces, positional args, var for instance vars, int/num dinostyle pseudo-primitives.

It seems like they tried to do some cool things, but failed in execution. Like "Greeter.withPrefix(this.prefix);" one-line constructor definition .. where this.prefix is a "shortcut that assigns the parameter's value to the instance variable prefix". Eliminate needless code.. but instead of using a dedicated symbol to call attention to the sugar, they used "this." WTF.. did they specifically want to kill scanability.

Things I've noticed so far that I like: using "_" as a prefix to enforce encapsulation.

Enforcing naming conventions as syntax seems at least somewhat python inspired in the sense of bringing the whitespace is significant design to naming is significant.. wish there had been more of that.

If someone other than Google were doing this it would be dead in the water already.

Re: Dart language

#243
post #231

Earlier quoted context omitted.

Well yes, but I think the motivation here is more 'since javascript is the only game in town, we'll have to compile to that'. I am not aware of any changes made to Javascript to make it easier to compile to it. And I don't think anyone would choose Javascript as their runtime environment if they had a choice. I like Clojure and have dabbled with clojurescript but the workflow feels pretty hacky and it is clear that t…

Do you mind elaborating on the hackish parts of the ClojureScript workflow? It's alpha software at the moment, but we can always use some feedback.

Hello Fogus. What an honor! I loved your book ;)

Well, I am certainly not complaining, I think it is mostly just that it needs to be compiled to javascript and that you need to have the right dependencies in place. If you are compiling from the command line it takes a long time (I know this is caused by the jvm startup time, but it still is a little annoying). I know there are workarounds such as cljs-watch but setting everything up right definitely takes some time. The browser-based Repl is awesome but sometimes breaks, I don't always understand why. I do think there could be some improvements in terms of tutorials but those will surely come (I might write one...)

So if you are using it on a daily basis then all of this probably doesn't matter but it does take a bit to get started. And I think to some part this reflects the fact that, well, Javascript was not really intended to be a platform to be compiled against, it is just used that way because it is the only platform in the browser.

Re: Dart language

#244
post #238

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

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.

The from item in blah syntax is just SQL rearranged, and SQL isn't as expressive as programming language constructs, so why try to emulate it?

It encourages you to write the grain of salt statement I mentioned earlier, which requires programmers to read through and understand the implementation of what you are doing, instead of it being embodied in a meaningful method and called. Of course you could just wrap that in a method, and slowly grow the line to 2-3 wide-screen monitors as you add more conditions.

The more tools you add to the core of a language, the more of a monstrosity of a kitchen sink it becomes (c#/.NET). Now you can loop over a list in 6 different ways! Hooray! That is why Dart looks good - a few basic concepts that can be used to build things suited to a particular problem.

Re: Dart language

#245
Either give me a brand new browser VM with a brand new modern language that is supported by all browsers or don't bother. If my code will be translated to Javascript I rather write it in Javascript and control it myself.

I'll happily adopt a new browser language if it offers me benefits that I don't get from Javascript, but I really don't get the new trend of compile to Javascript languages.

Re: Dart language

#246

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.

Re: Dart language

#247
post #222
post #212

Earlier quoted context omitted.

> I was hoping for something more like Python. Me too! We already have a very readable, simple and elegant language, let's use that. Anyone know why that wouldn't have worked? (Not using the current CPython implementation but maybe the same syntax but with a different (web-only) set of libraries, that is...)

That's almost exactly what coffeescript is. With Source Mapping in browsers, it also means you'll be able to get a .coffee line in your tracebacks too.

I agree. Yes, I would have liked to just have coffeescript as their new language. Maybe they could have just supported direct native execution on Chrome. Maybe Firefox would have followed.

Re: Dart language

#248

Earlier quoted context omitted.

Where's the best place to lodge our complaints? I'm fine with the semicolons, but I'm not too keen on using underscore-starting identifiers to determine what is public and what is private.

The misc mailing list is the (strangely named) main one: https://groups.google.com/a/dartlang.org/group/misc/topics . Join and fire away. > I'm not too keen on using underscore-starting identifiers to determine what is public and what is private. That's also been discussed. It has more going for it than may be at first apparent, but it has detractors too.

_ for enforcing encapsulation is great, probably the one thing I've seen in dart that's exciting. simple way of giving an existing naming convention significance and cutting down on character overhead. i could see a whole line of languages expand on this idea.

Re: Dart language

#249

Earlier quoted context omitted.

I like everything you propose here. Dart is earlier in development than I think most people realize, and I really hope we can get to something like what you're listing. Definitely self-hosting and a self-hosted IDE would be on my love-to-have list. As a testing nerd, integrating testing would definitely be on it too.

A good development environment is something where you could really differentiate yourselves, and I guess you could very easily integrate introspection and analysis features into chrome to help with it. I've been thinking for years that if I ever were to develop a new language, I would start from developer usability first - I think there is much more to innovate there than in the core language features, nowadays. Deve…

Certainly feasible: Smalltalk debuggers do this. And Smalltalkers (allegedly) use a workflow just like you describe.

Re: Dart language

#250
post #69
post #9

Earlier quoted context omitted.

It's actually runnable if you click the "play"-icon in the top-left of the code sample. The "Hello, Dart!" is written to a console emerging from underneath the code sample. https://code.google.com/p/dart/source/browse/branches/bleedi... is a more DOM-oriented version of the same program.

Hmm strange, I can't see the "play"-icon using FFX 3.6.23

Dart currently compiles to JS that runs on Firefox 4+.

http://www.dartlang.org/docs/technical-overview/index.html#h...

Post reply on HN