Live data from Hacker News

Announcing TypeScript 1.0

blogs.msdn.com

1–10 of 118 posts

Re: Announcing TypeScript 1.0

#5
This project really is the greatest thing that could happen in computer science : a great mind trying to solve a problem in the most pragmatic yet elegant way to achieve the greatest possible benefit for developper with th minimal amount of time and work.

Re: Announcing TypeScript 1.0

#6
It'd be great if there was a compiler that would compile TypeScript to asm.js [0]. Adding type-safety in TypeScript is only for the programmer -- when you compile it to Javascript, you don't get any performance increase. But, if you could compile it to asm.js, you'd actually get some performance increase out of it. (Note: I don't know much about TypeScript or asm.js, so if what I just said is completely untrue, I'd love to know why.)

[0]: http://asmjs.org/

Re: Announcing TypeScript 1.0

#7
post #6

It'd be great if there was a compiler that would compile TypeScript to asm.js [0]. Adding type-safety in TypeScript is only for the programmer -- when you compile it to Javascript, you don't get any performance increase. But, if you could compile it to asm.js, you'd actually get some performance increase out of it. (Note: I don't know much about TypeScript or asm.js, so if what I just said is completely untrue, I'd l…

asm.js requires you to manage your own memory. TypesScript doesn't, it's a pretty thin layer on top of JavaScript.

Re: Announcing TypeScript 1.0

#8
post #6

It'd be great if there was a compiler that would compile TypeScript to asm.js [0]. Adding type-safety in TypeScript is only for the programmer -- when you compile it to Javascript, you don't get any performance increase. But, if you could compile it to asm.js, you'd actually get some performance increase out of it. (Note: I don't know much about TypeScript or asm.js, so if what I just said is completely untrue, I'd l…

A well-typed subset of JavaScript (such as that produced by the TypeScript compiler) follows some very simple rules. Modern JS engines will recover 95+% of that performance automatically thanks to optimizations such as "hidden classes". This is also true of code that conforms to the Google Closure compiler's "type system", and by extension to idiomatic code produced by all of the more advanced compile-to-JS languages.

Re: Announcing TypeScript 1.0

#10
post #7
post #6

It'd be great if there was a compiler that would compile TypeScript to asm.js [0]. Adding type-safety in TypeScript is only for the programmer -- when you compile it to Javascript, you don't get any performance increase. But, if you could compile it to asm.js, you'd actually get some performance increase out of it. (Note: I don't know much about TypeScript or asm.js, so if what I just said is completely untrue, I'd l…

asm.js requires you to manage your own memory. TypesScript doesn't, it's a pretty thin layer on top of JavaScript.

Care to explain why?

To my understanding asm.js is a restricted subset of JS that allows for optimisations to be performed that would not otherwise be possible. In a similar way to how Java bytecode can be interpreted more efficiently compared to a non-compiled language, like Python.

With that in mind, sure you could target asm.js with a high level language that requires memory management, but why couldn't you also target it with a language that assumes GC. JS interpreters have this GC component built in already. Essentially I don't see how it is different from Java + Java bytecode + the JVM, which does perform GC.

I'm very curious about this.

Post reply on HN