Live data from Hacker News

Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

channel9.msdn.com

41–50 of 69 posts

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#41
post #21

Haxe anyone ? full HTML5 api support , dead-code elimination, loads of libraries and frameworks , easy integration with third party libraries ,multi-target (C++,Flash,JS,...) and open source...

Well, Haxe seems squarely aimed at the game sector, first with Flash, now with HTML5. There are quite a few possibilities, but I don't really see a big movement towards the "normal" web application area, even the nodejs/C++/Neko web wrappers seem a bit oriented towards providing backends for games. I'm not asking for Haxe's equivalent to Rails, but something like flask, sinatra, express or compojure would be nice. (Supported, with some mindshare behind it -- I'm aware that there are a few fledgling webapp frameworks on github)

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

( http://fantom.org/ and http://opalang.org/ )

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#42

Earlier quoted context omitted.

You don't say if you used the 'dart2js --minify' setting, but Closure Compiler should do well. The --minify flag leaves alot more room for additional minification. You say you used two modules. The result really depends on the modules. For example, the Dart/JS interop module adds about 140K un-minified. Tree shaking is always on, so the 140K is after stripping unused code. I initially jumped into Dart because I was i…

> You don't say if you used the 'dart2js --minify' setting 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...

Just for grins, I compiled the Dart app I'm working on now with --minify. It went from 530K to 240K. Then I cleared the --minify flag and used the Closure Compiler but it failed with errors. Not sure what is going on yet, but I don't think this is necessary or advisable -- I've never read of anyone using the Closure Compiler with Dart. Here is a sample few lines from --minify. It's fairly minimal.

function I(){} init() var $=I.p var $$={}

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#43
post #36

Earlier quoted context omitted.

I've been wondering whether I should start using this language for a project, and almost every time there's a good reason not too, but I'm still thinking one day there won't and i will. I'm curious to know what makes you think it will never happen, though.

It tries to be too many things to too many people, can't do a good enough job on any of it. Not really worth the investment.

haxe has flaws , but haxe is not backed by windows nor google. The team is 3/4 developers and they did a great work. Haxe will grow in the future. All it needs is a better "PR" and a bit of hype. A lot of successfull projects have been made with haxe.

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#44
post #24

Earlier quoted context omitted.

> 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. 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 "Dar…

Dart has special data types for the VM. They clearly want to target the VM for fast applications that aren't very usable compiled to JavaScript.

I doubt they are expecting Apple and Microsoft to incorporate the Dart VM, so they are putting a lot of effort into the JavaScript output. The Dart VM really comes into play in the near future for Chrome Packaged Apps. They interesting thing is loading snap shots of the virtual machine state quickly. http://www.infoq.com/articles/google-dart

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#45
post #12
post #4

I feel like Dart's emphasis on a fast but chrome-only vm has hindered it's adoption. I understand their goal, unlike most compile-to-js languages, was a language more amenable to fast implementation. 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.

Anything really new would be like that. WebGL was also Firefox-only for a while, until Chrome decided to adopt it. To make them a standard across browsers you either need to make them very popular, and make the others have no choice but adopting it, or collaborating. But the last one seems to happen less and less lately, with all companies.

I disagree. There's more cooperation because things are getting more complicated and it's necessary.

http://www.webplatform.org/stewards/

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#46
Dart is great and I like how they are focusing on making it fast and creating a special VM for it (dartium, although it compiles to javascript, too). It's tempting to target a compiler to generate dart code, too, instead of javascript. But there is one deal breaker for me - dart can't compile locally in the browser (even a dartium one). It requires a server or else compiling off-line (same issue with Closure Compiler, too). You can't code a dart app on a chromebook, for example (unless you use remote desktop or install ubuntu on it). The future to me is doing all development work in the browser, and only connecting to the server for the server components or version control, like with c9.io and other browser-based IDEs. Even Eclipse has a browser-based version now - Orion.

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

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#47
post #17

Can anyone explain what the difference between TypeScript and ECMAScript 4 are? I know ECMAScript 4 was abandoned for some reason, but from the few examples I've seen of Typescript it looks very similar. Did the js community just need a few more years to come around to the ideas?

ES4 ~= Action Script (with packages , classes , interfaces ,etc...) 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…

Afaik tsc can also compile to CoffeeScript-style modules if asked.

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#48
post #24

Earlier quoted context omitted.

Dart has special data types for the VM. They clearly want to target the VM for fast applications that aren't very usable compiled to JavaScript.

> Dart has special data types for the VM. It has optional types, like many compiled-to-JS languages (as lack of declared types is one of the motivations for such languages.) I don't know what you mean by "special data types for the VM". Can you provide some examples? > They clearly want to target the VM for fast applications that aren't very usable compiled to JavaScript. Obviously, they think that the VM will provid…

https://docs.google.com/presentation/d/1zfucLA3XNqRb7W56ldU_...

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#49
post #24

Earlier quoted context omitted.

Dart has special data types for the VM. They clearly want to target the VM for fast applications that aren't very usable compiled to JavaScript.

I doubt they are expecting Apple and Microsoft to incorporate the Dart VM, so they are putting a lot of effort into the JavaScript output. The Dart VM really comes into play in the near future for Chrome Packaged Apps. They interesting thing is loading snap shots of the virtual machine state quickly. http://www.infoq.com/articles/google-dart

Date of the article: Oct 24, 2011

Re: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

#50
post #48

Earlier quoted context omitted.

> Dart has special data types for the VM. It has optional types, like many compiled-to-JS languages (as lack of declared types is one of the motivations for such languages.) I don't know what you mean by "special data types for the VM". Can you provide some examples? > They clearly want to target the VM for fast applications that aren't very usable compiled to JavaScript. Obviously, they think that the VM will provid…

https://docs.google.com/presentation/d/1zfucLA3XNqRb7W56ldU_...

Interesting. I need Google Chrome to view these slides. (Doesn't work in Firefox 20 Beta.)
Post reply on HN