59 points · by michaelwww · 13y ago · 67 comments
Anders Hejlsberg: Everything you say and more I will agree with. The question is not whether JavaScript is broken. The question is whether it is broken enough to merit being replaced by something else.
Anders Hejlsberg: Everything you say and more I will agree with. The question is not whether JavaScript is broken. The question is whether it is broken enough to merit being replaced by something else.
[1] http://en.wikipedia.org/wiki/ActionScript#ActionScript_3.0
[2] http://blogs.msdn.com/b/ie/archive/2007/10/30/ecmascript-3-a...
> The second system syndrome is that evil effect that often happens when redesign a small, working system so that it becomes a huge leviathan built by piling new features over new features.
> Today I was reading the overview of ECMASCript 4 from ecmascript.org, and I got this very bad feeling that maybe the fourth version of ES, is suffering of an extremely strong case of this problem.
I dont know who is that guy , but what a load of cr*p ... it's people like him that got us stuck with what is javascript today. People often complain that Flash prevented Javascript from being widely adopted , the truth is that Macromedia/Adobe tried to push a better Javascript that would have helped the language then and today.Imagine we had ES4 and HTML5 today. Nobody would be complaining about how much javascript sucks , and there would be no need for typescript, coffeescript ,etc ...
I wrote it many years ago, but if you think it's wrong I'd be happy to understand why.
I have never been against Flash nor ActionScript(which I don't know enough to criticize) but my understanding was that ES4 was vastly more complex than even AS ever was, rather than being an incremental change as ES6 is.
And please note I wrote
""" ECMAScript 4 seems cool, I want to use a lot of those things (yay for multi method dispatch!), but maybe it is changing the language a little bit too much . """
And I wish I could influence what the dev world does, but I believe it is unlikely.
[0] http://www.riffraff.info/2007/10/25/ecmascript-4-the-fourth-...
The problem with typescript is that there is no real built-in module support you either need AMD or CommonJS that's why i wont use it.
The language is great but i dont want to have to use requireJS to create reusable components.
Funny how Microsoft rejected ES4 and now is "praising" and "advocating" for better web scripting language. That's hypocrisy.
Dart's VM isn't Chrome-only, its open source, and available both standalone and bundled into Chromium.
> However, I think the initial community reaction would have been more positive if Dart was positioned first as a language that compiled to js, with the added benefit that it runs significantly faster on Chrome.
Reaction might have been more positive in the short run if it was sold as a on-top-of-JS language rather than part of a long-term plan to build something to replace (or complement) JS as a language for which browsers would have a a built-in, language-specific VM. However, I think that even if initial reaction might have been better with such a response, Google clearly did the right thing by being up front about their vision.
I meant that dart is chrome-only in practice. I don't know of any other browser vendor that bundles the dart vm, including the few browsers based on chromium like rockmelt or 360.
> However, I think that even if initial reaction might have been better with such a response, Google clearly did the right thing by being up front about their vision.
I can appreciate Google's directness regarding Dart's intention. However, from a web developer's perspective, Dart's multiple backends is very unappealing. I hesitate to adopt even a language like clojurescript or coffeescript because of debugging barriers and potential bugs in the language's crevices (though these problems are diminishing with things like source map support).
I didn't think even Chrome bundles Dart, yet, either; for native Dart (as opposed to compiled-to-JS Dart), Google distributes (both separately and with the Dart SDK) a special Chromium-based browser with the Dart VM integrated called "Dartium".
For all practical short-term purposes, Dart is another compiled-to-JavaScript language, and is no more plagued by multiple backends than JavaScript (which, after all, runs on multiple different engines from different vendors) is.
And I don't see how having an optimized VM in development makes it less attractive than compiled-to-JS languages that don't have that.
> However, from a web developer's perspective, Dart's multiple backends is very unappealing. I hesitate to adopt even a language like clojurescript or coffeescript because of debugging barriers and potential bugs in the language's crevices (though these problems are diminishing with things like source map support).
I would think the fact that Dart is -- rather overtly -- immature and rapidly changing would be a much bigger barrier to adoption by relatively conservative, need-something-that-works-now, web developers. I don't see how having an experimental optimized VM available-but-not-widely-available-to-end-users factors in to making it less attractive to web developers.
It's not a huge deal - there are over a hundred alternative languages that compile to javascript out there now, many of which do support compiling in the browser: https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
dart2js is written in Dart. There's some small amount of work needed to self-host it and run the result in a browser, mainly swapping out the file IO API with something that works on the web. I think multiple people on the team have slapped together working examples of this, so it's not a lot of work.
It isn't a high priority for the dart2js team right now, though, and they are very careful to avoid taking on responsibility for features or use cases that don't have solid tests. I think before too long, we will have a reliably self-hosted Dart->JS compiler that runs in a browser, we're just focused on other stuff for the moment.
I have nothing against Dart. I played with it a year and a half ago when the Eclipse beta came out. It's nice tooling, but brings absolutely nothing interesting to the table.
I'm sure that, given enough time, they'll solve these problems, but as for right now... it isn't ready for primetime. Not by a longshot.
Seth Ladd has a couple of posts about Tree Shaking and Minification if you're interested http://blog.sethladd.com/2013/01/minification-is-not-enough-... http://blog.sethladd.com/2013/03/i-shrunk-my-dart-to-js-code...
I did. I'm no stranger to Closure Compiler, and even after fiddling around with ADVANCED_OPTIMIZATIONS for an hour, those ridiculous $variables persisted. What was even weirder was, just as a test, I imported a module I wasn't even using at all, and for some reason, Closure Compiler still refused to remove its code...
EDIT: Well, technically, Dart is actually designed to be interpreted (or JIT compiled, or what have you) by the Dart VM, so calling it a "compiled language" was incorrect on my part. However, dart2js is a compiler, so, it should be doing compiler-y shit.
Not that the game has been called, Typescript and Dart themselves have been out for a while and don't really took large slices of the pie. The biggest "transpiled" Javascript language is still Coffeescript, and that's basically Ratfor for the web.
There's also Opa and Fantom, if we're going even more esoteric...
Not sure why it doesn't get more love here, it's awesome for developing complex js libraries, in addition to what you can do server side, and/or on a mobile platform.
The language and compiler are solid, what it needs is better documentation, getting started guides, and tooling for things other than games with NME.
No committees. No marketing team. No developer evangelists. No PR team. No corporate interests. No budget.
Just code.