Facebook officially launches a programming language specifically for HHVM: hack
What do you think of the appearance of hack, as a phper how to understand this thing PHP
Reply content:
Facebook officially launches a programming language specifically for HHVM: hack
What do you think of the appearance of hack, as a phper how to understand this thing PHP
For compatibility with PHP HHVM (compile-time check or run-time check is not known).
Poor Yii2 and Laravel4 wasted time on HHVM compatibility.
I think there will be a PHP to Hack converter and the like to appear, the ultimate goal is still to let your PHP code run on the HHVM.
As for the enhanced type constraints, collections, anonymous methods and so on, write PHP for a long time naturally feel dispensable, from weak to strong type will be slightly uncomfortable, as a developer, the new out of what will immediately shift the eyeball is a major illness. Hack is the compromise of the strong and weak type language, running in the virtual machine, for the average developer, the introduction is not low, but for the cloud computing applications will be very eye-catching, HHVM several times the native PHP execution speed, can greatly save costs.
I don't have that application scale, and I don't spend time on things outside of the business logic.
When the performance and development bottlenecks are large enough, I am willing to join in the Hack.
Do not know why the answer to such a boring question, step on my death, the great gods,
When Facebook used PHP and MySQL, it didn't expect it to grow to its present size.
Because the switching cost is too high (plus the size of Facebook, which needs to be optimized to switch to any other scenario), Facebook has only one way to go black. Facebook has done a lot of optimization on MySQL.
PHP also has hiphop (HHVM), which improves the performance of PHP (or the running efficiency).
Hack is designed to improve PHP's development efficiency:
The first is the addition of type tag--large-scale project with multi-person cooperation, it is convenient and safe to have type checking.
Then there are some missing PHP features: Collection, Nullable, Lambda (php native lambda uses the outer variables to use
declare, really not used to ...) ), async, and so on
It doesn't mean much.