Live data from Hacker News

Dart language

dartlang.org

381–390 of 504 posts

Re: Dart language

#381

The only problem I have with this sort of development effort is that it fails to recognize that Javascript is an awesome language unto itself and has no need of "fixing" by introducing a completely new language that is completely different. Sure, it needs a few refinements here and there, but by and large Javascript is an incredible, flexible, and battle tested language. As a web developer with 11 years of experience…

You don't need to cast in Dart. Dart is not Java. It has concise closures as well. It has dynamic types. Javascript has problems. If it didn't, no one would be trying to evolve it and address it's weaknesses. The language had serious weaknesses, some of which were addressed recently (TypedArrays, strict mode, etc) and some of which there is no current fix (consistent, standardized, namespacing and modules), and some…

Sure, jQuery is bad at scale. And by "scale" I'm not talking pageviews, I'm talking features, development team, etc... For that, modular libraries like YUI and Dojo are the answer. You can create some of the most advanced web applications perfectly fine in JS as long as you approach it correctly.

P.S. Don't ever use the term "klocks" unless you want to sound like a enterprise middle manager who hasn't touched code in 20 years. Just a friendly tip. :)

Re: Dart language

#382
post #287

Earlier quoted context omitted.

Type are indeed anti-modular - types create huge amounts of coupling across multiple module boundaries in ways that are not easy to wrap up, to componentize, if you will. If you create a module A, but the interface of that module (functions, classes, whatever you might have put in it) uses types from modules B and C, is it not anti-modular?

Designs are anti-modular. Types are descriptions of the design. They document the (anti-)modularity. Take the types away and you have the exact same anti-modular design as before.

In so far as (a) the language has a static nominative type system and (b) these types describe values that pass between modules, all modules that work with types defined outside the module will require other modules that use the module to also include (implicitly if not explicitly) the module dependencies.

You can get away from this by having a structural type system, or by being dynamically typed (duck typing ultimately being another form of structural typing). But within the constraints of the type system, you can't get away from this by merely changing the design - unless you put everything into a single module, which is the ultimate in anti-modularity.

Re: Dart language

#383

The only problem I have with this sort of development effort is that it fails to recognize that Javascript is an awesome language unto itself and has no need of "fixing" by introducing a completely new language that is completely different. Sure, it needs a few refinements here and there, but by and large Javascript is an incredible, flexible, and battle tested language. As a web developer with 11 years of experience…

You don't need to cast in Dart. Dart is not Java. It has concise closures as well. It has dynamic types. Javascript has problems. If it didn't, no one would be trying to evolve it and address it's weaknesses. The language had serious weaknesses, some of which were addressed recently (TypedArrays, strict mode, etc) and some of which there is no current fix (consistent, standardized, namespacing and modules), and some…

I read a bit more into Dart, its optional typing is very interesting. I might even like that if it were a change to Javascript itself.

Of course Javascript has problems, every language has problems associated with it. They all have strengths and they all have weaknesses.

From what I've seen, projects like GWT, Dart, and Coffeescript come out of communities of developers other then the web development community. GWT and comes from Java engineers as an attempt to not have to write javascript, Coffeescript comes from Ruby developers attempting to accomplish the same thing. Now Dart is another attempt by the Java community to not write Javascript.

The thing is, I never hear from the web development community that Javascript is broken, missing major features, and needs to be replaced. These are the people using Javascript every day. The people that say Javascript needs these features are people who don't use it that much.

Re: Dart language

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

I like it. It still gives dynamic types like Javascript, but catches a huge class of errors immediately upon compilation. It's exactly what I wish Javascript had.

Re: Dart language

#386

Earlier quoted context omitted.

More than syntactic sugar is being added, for instance: https://developer.mozilla.org/en/JavaScript_typed_arrays

I'm super familiar with type arrays (I helped port GwtQuake which was one of the first apps to ever use them in large measure), but type arrays are an add-on API that doesn't change language semantics. Something that would change language semantics would be to offer early-bound namespaces. Early-binding would increase performance while simplifying VM implementation and make tooling easier.

Modules, which are statically bound, are part of ES Harmony [1]. Please stop spreading falsehoods.

[1]: http://wiki.ecmascript.org/doku.php?id=harmony:modules

Re: Dart language

#387
post #377

Earlier quoted context omitted.

What you are missing is the bleeding obvious: the topic of that other thread where I commented was Google's leaked memo about Dart as "replacement" for JS -- that memo created "the contest". Obj-C and Java are not browser-supported. Sure, there's a native apps vs. web apps contest. Native is winning? Not according to Fred Wilson (AVC) and other observers. Who knows, really. We're speculating, but let's find out by do…

With all due respect to the awesome work Mozilla is doing, I'm not seeing in your response anything about mobile-native-jshtml5 platform. Funny enough, Microsoft is currently promoting jshtml5 as a platform harder than Mozilla is, and given their platform unification message, that ought to include the mobile/tablet space as well. Edit. I'll have to retract the above. BootToGecko is the mobile platform from Mozilla. I…

Thanks for the retraction, and you're right: we are not going head-on against "mobile-native-jshtml5" (new one on me, but I know what you mean). I'm talking about B2G at Web 2.0 Expo New York this week. We will work up our marketing as we get closer to first hardware product launch with our partners.

Edit: we are, however, trying not to make special sauce on top of the web standards. Instead we're working with W3C and WAC to standardize device APIs progressively as we go.

Re: Dart language

#388
post #315

Earlier quoted context omitted.

If Google produced an innovative replacement for JavaScript, the world would listen. Instead, based on what they have released so far and your comments, they have released a language that is primarily designed to enhance their own tool-chain, which the rest of the world doesn't use and isn't interested in. We don't use GWT. Apparently, we won't use Dart either.

they have released a language that is primarily designed to enhance their own tool-chain You make this sound like its a bad thing, but that's open-source always and forever. Scratch your own itch.

He's not saying it's immoral of Google or anything, just that it doesn't help the rest of the programming world.

Re: Dart language

#389
post #315

Earlier quoted context omitted.

If Google produced an innovative replacement for JavaScript, the world would listen. Instead, based on what they have released so far and your comments, they have released a language that is primarily designed to enhance their own tool-chain, which the rest of the world doesn't use and isn't interested in. We don't use GWT. Apparently, we won't use Dart either.

they have released a language that is primarily designed to enhance their own tool-chain You make this sound like its a bad thing, but that's open-source always and forever. Scratch your own itch.

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.

Re: Dart language

#390

Earlier quoted context omitted.

I agree with you about the syntax - I was hoping for something more like Python. Perhaps this is by design, though? Presumably the syntax doesn't look too bad to people who spend all day writing JavaScript (i.e. the target demographic for this language). Presumably some bright spark will eventually write a Python-to-Dart compiler and then we'll all be happy :-)

When you're trying to change things, it's best to appeal to the early adopters and to do give them a real reason to switch. Making it look the same and appealing to the same "user base" won't work, because then they might find little reason to switch in the first place.

Staying with the norm worked out quite well for both Java and C#.
Post reply on HN