Live data from Hacker News

Dart language

dartlang.org

461–470 of 504 posts

Re: Dart language

#461
post #404

Earlier quoted context omitted.

I mean that (programming) language is a special kind of object that has enough versatility to express any idea in a reasonable form. Historically, our programming languages weren't that good in versatility and made various utterances an universally agreed on pain. But we are getting better and there is no law in the universe saying that we'll be forever stuck in Babel. To some extent, your point is that Shakespeare i…

"Historically, our programming languages weren't that good in versatility" Well, we're not yet to the point that barrier between systems and web programming languages to be eliminated. You seem to imply that the problem is the inflexibility of the languages, but to me it's not a problem, it's a feature: I want different abstractions to work in different problem domains (e.g. systems vs web). So it's not that the lang…

> Well, we're not yet to the point that barrier between systems and web programming languages to be eliminated.

We are one or two iterations away. Look at this thread. A lot of people were expecting something looking closer to Go. Go itself is an example: statically typed, garbage collected "systems" language. If you ignore the differences in the type system and the slice syntactic sugar, that sounds conspicuously close to Java. And Dart itself sounds closer to Java than Javascript as well. Not that I believe we'll converge on Java, given the glacial pace of evolution in that community.

But the edges of the state-of-the-art are getting closer in this generation. Next generation (5-10 years from now) will be even closer, if not identical.

On a technical note: what exactly do you have in mind when making a distinction between "web" and "systems"? Backends qualify as "systems" in my book and I'd be a fool if I'd want to develop in two distinct languages when there is just one app. Thanks to GWT and now Dart, I don't have to.

Re: Dart language

#462

Earlier quoted context omitted.

"Abso-friggen-lutely" on top of "three cheers" lacks qualification about the thing you cheered being less than good for anyone. You were abso-friggen-lutist. Anyway, the open web standards are not failing. Dart is not a clearly better solution. I get your point about XHR, but do try to take mine about the whole history being a mixed bag, including what IE did. We can do better.

georgemcbay basically said [why shouldn't Google do what they want with their browser?], to which thristian replies [because...Microsoft]. I think that's a bullshit argument, especially since there's nothing about Dart that threatens to take away anyone's freedom to continue using Javascript or whatever else comes along. I gave a bullshit reply to make a point; let's call it hyperbole. Of course I know that it was a…

I have mixed feelings about JS and most software, but moreso JS than, e.g., Unix (BSD kernel code in the late '80s, not to date myself too much).

People seem to think I have some big ego investment in JS, but it's this thing I did in a hurry, but with a purpose that caught on when the web was young and growing fast. JS is not done, yet it will be hard to replace.

JS is easier to extend than some here claim (and as my recent comments have noted, not all the parties on the record asserting that it's hard to "fix" are truly giving it their best effort). As with most web standards, you can't remove stuff predictably, but new and more winning extensions can help retire worse old forms.

Business may be WAR but the modern browser era is marked by claims of peace and openness and standards conformance. So while Dart, and (I joke; I hope this doesn't happen) matching novelties from Apple ("Flechette") and Microsoft ("Javelin"), will take some attention off the standards, the forces operating in favor of standards will probably manage to keep JS evolving.

I actually miss some of the Googlers who have worked in TC39, or around the edges, but who are now full time on Dart or other projects. It seems like a lost opportunity to me, but it's Google's call.

Re: Dart language

#463
post #241
post #139

Earlier quoted context omitted.

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

Yeah, those aren't types, they're merely annotations.

Re: Dart language

#464
post #416

Earlier quoted context omitted.

But is it something people actually type? I haven't played with Java for almost ten years now but I do C# for a living which is pretty similar and I can't remember the last time I had to type something that long, Visual Studio does it for me. I can see the point if you say it's longer to read but it's also much clearer, isn't it?

Redundancy is noise.. How is it any clearer to read?

How's that redundant? In C# you would just "var something = new object()", so there wouldn't be any redundancy at all.

Re: Dart language

#465
post #454
post #389

Earlier quoted context omitted.

This was advertised as a replacement for JavaScript. It turned out to be a replacement for GWT. False advertising. I'm wasting time reading specs and code samples and comments just to figure that out. I don't like being misled or wasting time.

I'm curious what you thought a JavaScript replacement would look like. Apparently you thought it /wouldn't/ look like GWT.

Python has a great, clean, compact and expressive syntax and a lot of syntactic sugar. Erlang does concurrency and error handling well. A mix of the two would be a great language to work with.

Re: Dart language

#466
I am really disappointed seeing the "yet familiar" argument behind the C-like syntax.

It takes a day to get used to Python syntax, and another day to make it subconscious, that is to stop forgetting it.

The arrow in CoffeeScript is a pain to type, but overall CS saves you a lot of time.

How come Google that can dictate rules to some extent, doesn't have the balls to fix the long lasting issue with syntax? Why voluntarily subject oneself to, probably, years of pain?! Did they just start following letter-by-letter the success stories, like the one of Javascript? (scheme+smalltalk+java/c syntax)

I can't find an explanation to this.

Re: Dart language

#467
post #461

Earlier quoted context omitted.

"Historically, our programming languages weren't that good in versatility" Well, we're not yet to the point that barrier between systems and web programming languages to be eliminated. You seem to imply that the problem is the inflexibility of the languages, but to me it's not a problem, it's a feature: I want different abstractions to work in different problem domains (e.g. systems vs web). So it's not that the lang…

> Well, we're not yet to the point that barrier between systems and web programming languages to be eliminated. We are one or two iterations away. Look at this thread. A lot of people were expecting something looking closer to Go. Go itself is an example: statically typed, garbage collected "systems" language. If you ignore the differences in the type system and the slice syntactic sugar, that sounds conspicuously cl…

Well, by "web programming" in the context of the original comment, I was talking mostly about web backends. If you mean that, then yeah, we'd develop those in one language, in fact we already do in some case (node.js et al).

But I don't qualify that as "systems programming", to quote Wikipedia:

"System programming (or systems programming) is the activity of programming system software".

and:

"System software is computer software designed to operate the computer hardware and to provide a platform for running application software".

Re: Dart language

#468
post #425

Earlier quoted context omitted.

Nitpick: you can make a constructor look like a regular method that happens to return a new instance, but you cannot make it one. How would that constructor make the instance that it returns? I think the overhead of adding that 'new' is worth it. Without it: in var foo = Bar() , is Bar a type or a function? If you decide it should be colored like a type, your syntax colorer needs deeper information about the code, ma…

Not true, look at Objective-C for an example of how it's done. Broken up into two methods, the first of which is a static method which creates an uninitialized instance, and the second which is a plain method which initializes the instance and returns self (or rarely, nil): + alloc // reserves memory and creates an instance - init // initializes the instance - initWithSomething: // can have multiple inits

I go back and forth on whether I like this. On the one hand, the clean split makes it conceptually simple what's going on. On the other hand, you can have allocated, uninitialized code, which makes me uneasy.

Re: Dart language

#469

Earlier quoted context omitted.

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

I read about this, and even tried downloading squeak once, but didn't find it very compelling. I admit that I might not have given it the time it needed, though...

A few weeks ago I whipped up this 3-minute video showcasing a Smalltalk class browser, method finder, and debugger: http://vimeo.com/27850933

Re: Dart language

#470
post #241
post #139

Earlier quoted context omitted.

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

    void doSomething(String a) {
        // Do something 1
    }

    void doSomething(Integer a) {
        // Do something 2
    }

    doSomething("1");
    doSomething(1);
That's the sort of thing they mean by types don't change how programs behave. You can't easily change or remove the type system because it's tightly coupled with method resolution. If you have an optional type system, the evaluation semantics of the language cannot depend on the type system because you don't want the program to do something different if you are/are not using the type system.

The fact that type errors are only manifested as warnings is a (perhaps odd) design decision, but it doesn't stop them being type errors. They could just as easily made them errors, and String a = 1 would give a compile time error.

Hopefully they'll be a 'warnings as errors' flag for those of us more used to type errors being compile errors.

Post reply on HN