Live data from Hacker News

Dart language

dartlang.org

121–130 of 504 posts

Re: Dart language

#121
post #117

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.

In terms of a language, it looks like a horrible step back into the 90s. What we need is the language to be terse, and clean with lots of built-in functional utilities for manipulating data structures and objects/modules/classes/etc. Ideally, take the best bits from ruby/coffeescript/coco/python and couple them with high quality tooling. Many of the most innovative minds are flocking to these languages for good reaso…

Also +1 for ability to extend the language itself so we can code in DSLs. This is so powerful.

Re: Dart language

#122

Earlier quoted context omitted.

I'll give you my votes then: - no braces where avoidable, no semicolons where avoidable - release early a free, open source reference development environment that really helps in developing with Dart. The biggest pain with Javascript, imho, is in the lack of development tools really thought out for it, and not just an adaptation of Java/C/whatever other editors - if you develop said IDE as a web-IDE, even better (why…

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. Developer usability is tightly coupled with the development tools the developer can use, not just with abstract language features. And especially for web development, you can't think only about top of class developers.

As I'm at it, I'll write here my dream feature of any language and IDE - not knowing if it is really feasible, but it doesn't look really impossible to me. Use case:

- You run your unit tests

- An assertion fails/there is an error

- A debugger brings you to where the problem is

- You can step back from where you are, make changes on the fly to your code and the tests, and step forward to the assertion/error again.

I guess that with a VM, and excluding some operations that depend from external status and which are destructive, this could be possible, and it could allow an incredible speedup in development...

Re: Dart language

#123
post #37

If you're going to go to the trouble of creating a JavaScript replacement, making something more like Java is the wrong way to go IMO. CoffeeScript is a lot more palatable.

CoffeeScript basically simplifies (and does a pretty good job, imo) existing JavaScript language features. Whereas, Dart adds classes and interfaces and a few other neat things. Admittedly, however, I do cringe whenever I see things like x.compareTo(y) or X x = new X();

as a sidenote, it does seem they have user defined operators, just not the starship for compareTo

Re: Dart language

#124
post #102
post #70

Earlier quoted context omitted.

I love Python. I prefer working without semicolons. But from a new language standpoint, it's not worth dropping them. The ridiculous arguments that come out of it, the programmers who refuse to use the language because of it, they're things that can and should be avoided by using semicolons like most languages. I'll never understand why programmers care so much about this, but hey, that's life.

Programmers care about it because it adds extra noise to your program. If you semantically, and naturally, communicate "end of statement" with a line break to human readers, why should you have to say it again with a semicolon to the compiler? Programming languages should focus on being DRY.

For human readers we use periods, not line breaks.

Re: Dart language

#125
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.

greeter := Greeter()

Re: Dart language

#126

Earlier quoted context omitted.

Not perfect, but I prefer that over: document.querySelector('#menu').appendChild(sliderMenu.node); If you have suggestions for improvement, please do pass them along.

Bake in a jQuery-like thing, or make it easy to build jQuery-like things, since I would much rather write something like the following in any language: $('#menu').append(sliderMenu);

We had a separate jQuery-like lib that we wrote in Dart for a while before we figured, "why not just make the main DOM API better"? So this stuff:

    document.query('#menu').nodes.add(sliderMenu.node);
Is a reflection of that. The ".node" part after sliderMenu will go away at some point. Our DOM lib doesn't currently work like jQuery's "collection-that-acts-like-an-object" style because we're worried about performance.

Keep in mind that you can always ditch jQuery and go straight to the DOM if jQuery is too slow. If jQuery was the only way, you'd lose your fast path.

So we've tried to come up with a DOM API that's easier to use, but still performant. If you've got ideas for how we can improve it, we'd definitely like to hear them.

Re: Dart language

#127
post #64

Earlier quoted context omitted.

Meanwhile, I've been slowly eliminating my usage of `class` from all of my CoffeeScript code. I've found that my code is much more reusable, far less prone to `this` bugs, easier to reason about, etc. I used to be a huuuge OOP guy, but now I rarely find a use for classes...

Prototypes are fine for a language like JavaScript. They keep things simple. I'd prefer that CoffeeScript (and Dart, of course) implemented a decent syntax for prototyping, replacing the JS mess, rather than trying to disguise them as leaky and half-featured classes.

There was a recent article on HN about Self and its prototype patterns. Looked far superior to Javascript's. But even still, prototypes only seem primarily useful if you want member-access as dot-notation or polymorphism by type. When preferring composition over inheritance, most polymorphic-by-type situations either go away or can be trivially replaced with maps.

That said, CoffeeScript provides another interesting use for them: Simulating dynamic binding. Basically, the trick is that `this` becomes the dynamic binding context and `@` represents a dynamically bound variable. You use `fn.call @, x, y, etc...` if you want to pass the dynamic binding to callees. Nested bindings can be established with `Object.create`

Re: Dart language

#128

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.

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.

Re: Dart language

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

The language does look less cumbersome than Java though. In terms of how interesting I find it, I would place it between Java and Haxe. While I cannot see what it buys you that CoffeeScript or even JavaScript do not, I do not have Google's vantage point to be able to adequately judge. I am only at the foot of the mountain they already scaled. And then tunnelled.

Not only did they create V8, they write many boat loads of JavaScript so they are well placed to address both the technical and human pain points of scaling JavaScript. And in introducing a new language they can't stray too far from the mainstream if they wish large adoption. All that said, I am not moved.

Also, F# is Don Syme's work not Erik Meijer's. Although F# probably gained from some Haskell people in Cambridge (the original one).

Re: Dart language

#130

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.

> The language isn't done yet. Now is the time to let us know if you want semicolons to go away. Seeing how Go, which "wasn't done yet" either, handled external feedback... I don't see why anyone would have hopes for dart.

Look at how C++ handled external feedback and what it became because of this.
Post reply on HN