Live data from Hacker News

Dart language

dartlang.org

131–140 of 504 posts

Re: Dart language

#132

Earlier quoted context omitted.

That statement came with no benchmarks or numbers, no knowledge of the Dart VM and it's relative performance to V8, and no knowledge of the Dart to JS compiler and what kinds of optimizations it does. If you run Google's closure compiler on JS, for example, in some cases, it produces a very significant speedup than hand-tuned hand-written JS, so saying "never be decent" is a pretty strong claim to make.

The key part is (...) compared to having the Dart VM in the browser. It seems pretty obvious to me that unless Google fucks up the VM implementation, it'll always be much faster than compiling to JS, which doesn't even implement the same concepts - let alone semantics - of Dart. In fact, if VM is not much faster, why would they have it at all? Being faster than handwritten JS is irrelevant, because the VM will be fas…

Browsers already have a wide performance differential. What's the ratio between V8 and IE6? Or between desktop and mobile? As long as the performance isn't pathologically bad, it won't matter. Dart apps will start up quicker and run a percentage faster. Maybe perform much better on mobile. A decent win, but doesn't really change the fragmentation equation much from what it already is.

The keyword Brendan used was "decent", and frankly, I'll take a stab and say performance of Dart to JS will be beyond decent.

Re: Dart language

#133
post #55
post #48

Earlier quoted context omitted.

To be honest though, small syntactical differences like that are something that is meaningful only for novice-to-intermediate level programmers. Semicolons, braces, tabs-vs-spaces - classical examples of bikeshed bickering.

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.

I have actually been noticing that I seem to prefer semicolons and braces in my code. I wonder if something about them makes it easier for my eyes/brain to delimit the content on the screen. Perhaps the "easy context-free-grammar parseable" code is easier on the brain than "hard context-free-grammar parseable" code. Having written a CFG for a Python dialect for one of the classes I took, it was a little tricky the first time doing it. Sure, it's not rocket science, but the fact that the semicolon is easier to implement may have some connection with easier identification of delimition on the screen.

Re: Dart language

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

It is. Google is betting heavy on android. Expect more Java style languages.

Re: Dart language

#135
post #55
post #48

Earlier quoted context omitted.

To be honest though, small syntactical differences like that are something that is meaningful only for novice-to-intermediate level programmers. Semicolons, braces, tabs-vs-spaces - classical examples of bikeshed bickering.

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 to read, or learning how to read a new script. At first, you focus on the letters, composing words or sentences. When you get more experience, you read ever-larger blocks of text at once and you no longer need to read aloud or read aloud in your head, you can read whole lines or several lines at once and immediately transfer the concepts embodied in them into your mind (this is effectively how people read - chunks of text at a time, it's also why it's easy to read text where the letters of all words are mingled except the first and last one, a feat that is impossible when reading letter by letter or even word by word).

Anyway, in reading/writing code it's the same - at some point you no longer see a line with statements, you see a block with initializations, or no longer a set of if/then or switch statement, you see a jump table. Once you get to that level, dollar signs to denote variables disappear from the mental model you have, because you no longer see tokens - you see variables (same with semicolons, braces, most indentation, etc.). That's where the comparison came from.

(I also think that that's where eloquent code comes from - it's from programmers who make an efficient and recognizable translation from high-level concepts into the mechanics of the programming language, even if there is no explicit support for such concepts in the language).

Re: Dart language

#136

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.

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 homepage links to this: http://www.dartlang.org/support/index.html.

Re: Dart language

#137

Aaaarghhh! It is full of semicolons. Is it really necessary in the 21st century to create a language that terminates lines with semicolons? I am sure I have seen some other languages in the past that get by just fine without them.

Which languages? javascript and go are both counter examples. In Go the lexer (sic) determines where a line ends, so if you write

    if (a == b)
        && (c == d) 
it will guess a line end after the first closing paren. WTF?

Python is a totally different beast, and I wouldn't include it in the discussion, because it also uses whitespace for block grouping.

Re: Dart language

#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 typing, interfaces. Did I miss anything?

Re: Dart language

#140
Who wants to begin work on CoffeeScript-for-Dart? Possibly call it Arrow or Bolt, although I'd find Dash endlessly amusing.
Post reply on HN