View facebook's hack and PHP

Source: Internet
Author: User
Facebook officially released a programming language specifically for HHVM: hack. What do you think of the emergence of hack? As a php per, how does it understand this? php Facebook officially released a programming language specifically for HHVM: hack
What do you think of the emergence of hack, how does php understand this as a PHPER?

Reply content:

Facebook officially released a programming language specifically for HHVM: hack
What do you think of the emergence of hack, how does php understand this as a PHPER?

To be compatible with HHVM's enhancements to PHP (compilation check or runtime check is unknown ).
Poor Yii2 and Laravel4 are wasting time on HHVM compatibility.
I think there will be something like the PHP to Hack converter in the future, and the ultimate goal is to keep your PHP code running on HHVM.

As for Enhanced type constraints, collections, anonymous methods, and so on, it is natural to feel dispensable after I write PHP for a long time. from weak to strong types, it will be slightly unsuitable for developers, it is a serious problem to immediately remove the eye if something new occurs. Hack is a compromise between strong and weak languages. Running in virtual machines is not easy for common developers, but applications will be very eye-catching for cloud computing, HHVM is several times faster than native PHP, which can greatly save costs.

I don't have that application scale, and I don't have to spend any time out of business logic.
When the performance and development bottlenecks are large enough, I am very willing to participate in the Hack.
I don't know why I would answer such boring questions. I should step on me,

When Facebook used PHP and MySQL, it was not expected to grow to the current scale.

Because the switching cost is too high (in addition to the scale of Facebook, special optimization is required to switch to any other solution), Facebook can only go straight to the dark. Facebook has made a lot of optimizations on MySQL.

PHP also achieved hiphop (hhvm) to improve PHP performance (or running efficiency ).

Hack is used to improve PHP development efficiency:

The first is to add the type mark-a large project with multiple partners. It is much easier and safer to perform type checks.

Then, some PHP missing features are supplemented: Set, Nullable, and Lambda (PHP native Lambda uses outer variables anduseStatement, it's really not used ......) , Asynchronous, etc.

It doesn't make much sense

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.