3 ms·
Yes and no. Yes, because TypeScript is bringing a type-system to a dynamically typed language and so did Hack. No: because Hack is bringing some additional lang
by julienv 13y ago
Yes and no.
Yes, because TypeScript is bringing a type-system to a dynamically typed language and so did Hack.
No: because Hack is bringing some additional language features affecting the runtime. Modest changes for now, but we intend to carry on in that direction.
- jabits 13y agoWell, it seems Microsoft is doing similarly with Typescript, except instead, waiting for the spec to catch up. I like both ideas.
- Touche 13y agoI don't know what you mean by that... stuff like classes were already in the harmony proposal phase before Typescript implemented them. Stuff like type hints won't be in JS ever.
- michaelwww 13y agoAt least to date, Microsoft stresses the "TypeScript is just JavaScript." New language features are added to ES6 and then wrapped with types in TypeScript.
- ahoge 13y ago> No: because Hack is bringing some additional language features [...] TypeScript added classes, interfaces, modules, and arrow functions.
- ufo 13y agoThe key difference is affecting the runtime. All those typescript features can be compiled down to regular JS and typescript-generated javascript can be run in a browser without extending the JS engine.