Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hack has incompatibilities with some current PHP code too. Particularly the different syntax for generators (PHP 5.5) and the upcoming syntax for variadic functions (PHP 5.6).


Can you elaborate on these incompatibilities, particularly generators? I work on the project and the only generator incompatibility I know of is that what PHP5 calls "Generator" we call "Continuation", but only since we haven't gotten around to renaming ours yet :) I'm also pretty sure HHVM supports 5.6 variadic functions in PHP code, or will very soon; the Hack typechecker currently does not, but that is strictly a missing feature, and something we do want to support.


There's already open issues in GitHub regarding the differences in generator syntax -- I commented in one:

https://github.com/facebook/hhvm/issues/1787

I guess the class has been renamed in trunk, but according to this, the syntax differences still remain:

https://github.com/facebook/hhvm/issues/1871

And while we're at it, might as well point out the missing Closure::bind and Closure::bindTo from PHP 5.4:

https://github.com/facebook/hhvm/issues/1203




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: