How to look at Facebook's hack and PHP

Source: Internet
Author: User
Tags hhvm
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.