Live data from Hacker News

Dart language

dartlang.org

151–160 of 504 posts

Re: Dart language

#151

Earlier quoted context omitted.

> there, no need for `new`. Agreed. I didn't say you couldn't get better at all, just not much better. I'd personally be in favor of ditching new (or conversely making it a method on the class). > The speed and wide-spread use of Smalltalk with the regularity, flexibility and terseness of Java's syntax? Oh, you. You may be right. Making a new language is crazy, especially if you're aiming for widespread adoption. Sti…

> Agreed. I didn't say you couldn't get better at all, just not much better. I strongly disagree, it makes away with a keyword and magical syntax, that is much better. > Making a new language is crazy, especially if you're aiming for widespread adoption. That's not what I'm saying, I like new languages, and I like interesting new languages, but it pains me to see you defend (or even work on?) Dart, which so far looks…

Well to be fair, the language it is replacing for the most part works, it's mostly just patching up problems: ability to optimize for startup performance, ability to program in the large, and ability to write tools easily (IDEs, etc)

Most new programming languages are really just variations on those that came before them. You've got you're LISP derived, your Forth/Stack derived, your APL derived, your ML derived, etc.

IMHO, it's hard to consider a programming language in isolation. As far as 'feel' or 'productivity', it really comes down to the ecosystem, the runtime and tools available. Here I think is where Dart hopes to excel -- make a JS-like replacement that supports a better runtime and tools story.

Re: Dart language

#152

Earlier quoted context omitted.

Why didn't they go a bit further and have type inference? They proved already with Go that you can have type inference in a language and still have a fairly light/dynamic feel.

Type inference is a tooling feature, not a language feature for Dart. The tools can do some type inference now, and more may be added later. At the very least, I personally really hope we get fully inferred local variables.

You really need to make a list of these types of response on your webpage.

Re: Dart language

#153
post #147
post #120

Earlier quoted context omitted.

Could you enumerate what actually made you hate it? Familiarity is not necessarily a bad thing, and it seems it was one of the main goals of the language.

This http://www.dartlang.org/docs/technical-overview/index.html A delightfully blank page :-) Yes it mentions classes, interfaces, optional types, libraries, tools, structured yet flexible language. But all of these are a given. Is there nothing else? What about Generics, Covariance/Contravariance ? Type inference? Odersky thinks type inference in the presence of subtyping is untenable. Is it the same here? Are inter…

I guess you should have a look at the language spec, there are answers to some of your questions and concerns. (http://www.dartlang.org/docs/spec/dartLangSpec.pdf)

For example: " Dart supports optional typing based on interface types. The type system is unsound, due to the covariance of generic types. This is a deliberate choice (and undoubtedly controversial). Experience has shown that sound type rules for generics fly in the face of programmer intuition. It is easy for tools to provide a sound type analysis if they choose, which may be useful for tasks like refactoring."

Re: Dart language

#154
post #135
post #55

Earlier quoted context omitted.

No, they're not – nor is tabs-vs-spaces (convention) in the same category as semicolons (syntax). It's ergonomics; less superfluous entities and boilerplate makes it easier to express ideas.

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…

I am such an expert at reading English that I no longer think in terms of individual letters. Instead I think in words, phrases, concepts, and lines of argument.

But a crappy typeface or color scheme can still give me a headache.

Re: Dart language

#155
post #2

Creating an object: Greeter greeter = new Greeter() or var greeter = new Greeter() Defining a constant: static final myConst = 1 Plus there are classes, interfaces... It's just Java?

> var greeter = new Greeter() Well, it's hard to get that much better than that. > Plus there are classes, interfaces... It's just Java? Java didn't invent classes. It certainly looks a lot like Java, but it's more Smalltalk under the hood.

> Well, it's hard to get that much better than that.

Ok, fine, but why have both forms?

Re: Dart language

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

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 engineers to, but not something that would inspire "hackers".

Now I feel like it is not worth to create any "brigthly" IDE whatsoever. Just go with eclipse.

I was planning to immediately rush to the language. But changed to wait and see now.

Misses:

  - Incredibly uninspired, boring Java-like syntax.
  - Not everything is an expression.
  - Java-like classes, instead of anything more interesting.
  - Lacks simplicity, symmetry and beauty.
  - Semicolons.
Some notes:

  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.

  named constructors:
  var greeter = new Greeter.withPrefix('Howdy,');
Mildly interesting.

  Every type in Dart is public unless its name starts 
  with an underscore ("_")
I laughed at this. I always have hated the practice to start with "_" for supposed private variables, in languages without true private. I like it this way in Dart. My little favorite syntax feature until now.

Re: Dart language

#157

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…

This is what JavaScript is trying to be, with the latest revision. They're explicitly trying to make it a better target language for things like ClojureScript and CoffeeScript.

Re: Dart language

#158

A language that compiles to JavaScript really needs better browser support. Decent web apps use feature detection to provide graceful degradation for browsers from the stone age. Dart breaks this by making it impossible to run any code at all. I mean, "IE9 support coming soon!", what the hell? What about IE6? This isn't a CSS style or an animation library we're talking about.

Fuck IE6 and all its users.

Re: Dart language

#159
Two things I don't like about Dart, just from reading the tutorial:

1. Consuctor syntax requires repeating the name of the class when yor define the constructor. So if you change a class name, you have to carefully find all your constructors and rename them.

2. Instance variables in classes seem to be defined at the same level as class methods. Yet one is an instance attribute, and the other a class attribute. So you have irregular scoping rules based on type (data vs. function). This scares me as it indicates functions are "special" and not first-class types in the language.

Re: Dart language

#160
post #92
post #11

I am most excited about the concurrency model! "Concurrency is supported via actor-like entities called isolates. An isolate is a unit of concurrency. It has its own memory and its own thread of control. Isolates communicate by message passing (10.14.4). No state is ever shared between isolates. Isolates are created by spawning (10.11)" http://www.dartlang.org/docs/spec/dartLangSpec.pdf I wonder how they compile this…

Well, you can implement pretty much everything you just described as a library. The only thing missing is preventing memory sharing, but that you can sort out at compile time. An interesting question is if this means V8 is gaining threads.

V8 with threading? interesting.
Post reply on HN