News for hackers. Stuff that matters.
Re:Hack: a new programming language for HHVM by prototrout on Thursday March 20, 2014 @12:31PM (#7436615)
At a glance it looks like Hack is to PHP what TypeScript is to JavaScript. Is that a fair analogy?
Re:Hack: a new programming language for HHVM by julienv on Thursday March 20, 2014 @12:40PM (#7436706)
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.
Re:Hack: a new programming language for HHVM by ahoge on Thursday March 20, 2014 @07:09PM (#7439519)
> No: because Hack is bringing some additional language features [...]

TypeScript added classes, interfaces, modules, and arrow functions.

Re:Hack: a new programming language for HHVM by ufo on Friday March 21, 2014 @07:35AM (#7441656)
The 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.
Re:Hack: a new programming language for HHVM by jabits on Thursday March 20, 2014 @01:19PM (#7437035)
Well, it seems Microsoft is doing similarly with Typescript, except instead, waiting for the spec to catch up. I like both ideas.
Re:Hack: a new programming language for HHVM by Touche on Thursday March 20, 2014 @02:36PM (#7437634)
I 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.
Re:Hack: a new programming language for HHVM by michaelwww on Thursday March 20, 2014 @03:34PM (#7438006)
At least to date, Microsoft stresses the "TypeScript is just JavaScript." New language features are added to ES6 and then wrapped with types in TypeScript.