Live data from Hacker News

Ask HN: State of PHP at Facebook?

news.ycombinator.com

41–50 of 88 posts

Re: Ask HN: State of PHP at Facebook?

#41
post #35

Earlier quoted context omitted.

Facebook uses a monorepo, similar to the way Google does it. Dependencies are vendored and checked into the repo. Facebook has released a tool for migrating software between repos, which is much like Google's Copybara: Facebook's fbshipit: https://github.com/facebook/fbshipit Google's copybara: https://github.com/google/copybara With these tools, you can make fairly sophisticated choices about how you do vendoring. Y…

Thanks for the infos! What does "Dependencies are vendored and checked into the repo" mean?

https://stackoverflow.com/questions/26217488/what-is-vendori...

ie copy software source into your own repository, ideally in such a way that you can keep it up to date (which is what shipit/copybara are for)

Re: Ask HN: State of PHP at Facebook?

#42
post #26

Ex-Facebooker here. Hack isn't going away. Ever. It's actually quite pleasant to develop in. The tooling now revolves around VS Code, which I personally don't like. I wish they'd based this on a Jetbrains core. One thing I learned to love with the Hack type system is that nullability is a distinct type (eg you can assign a T to a ?T but not a ?T to a T; ? here means "nullable"). The static type checking is smart enou…

This is the second such PHP thread I've seen in the last 24 hours (the other one was on a different web property); gotta love people shitting on PHP like it's 1998

Some people like pretending that other languages don't have their own warts. There are thousands of mature SAAS products that use PHP and don't rely on Wordpress for anything. I don't think that anyone who uses Javascript as part of their backend stack has any room to criticize.

Re: Ask HN: State of PHP at Facebook?

#43
post #26

Ex-Facebooker here. Hack isn't going away. Ever. It's actually quite pleasant to develop in. The tooling now revolves around VS Code, which I personally don't like. I wish they'd based this on a Jetbrains core. One thing I learned to love with the Hack type system is that nullability is a distinct type (eg you can assign a T to a ?T but not a ?T to a T; ? here means "nullable"). The static type checking is smart enou…

Does anyone use Hack outside of Facebook. Disclaimer: it’s been years since I looked at it and even at the time it was a very cursory look as PHP 7 was buzzing.

Re: Ask HN: State of PHP at Facebook?

#44
post #35

Earlier quoted context omitted.

Facebook uses a monorepo, similar to the way Google does it. Dependencies are vendored and checked into the repo. Facebook has released a tool for migrating software between repos, which is much like Google's Copybara: Facebook's fbshipit: https://github.com/facebook/fbshipit Google's copybara: https://github.com/google/copybara With these tools, you can make fairly sophisticated choices about how you do vendoring. Y…

Thanks for the infos! What does "Dependencies are vendored and checked into the repo" mean?

It means you literally commit the code from the dependency into your own repo. https://stackoverflow.com/questions/26217488/what-is-vendori...

Re: Ask HN: State of PHP at Facebook?

#45

Related question, to those who have experience in both PHP and Hack, is Hack worth it? Would you start a startup in it?

You cut off yourself from the whole PHP ecosystem. Hack has very small community (if any nowadays) compared to PHP.

While Composer, Laravel and Symfony are very nice to work with.

Re: Ask HN: State of PHP at Facebook?

#46
Given the big investment, I don't know what they would use instead. They seem to now have a very high level language well suited for the web, but with most of the advantages of a typed-from-the-start language, and great performance for the tasks it's doing. It's hard to think of an existing language that wouldn't be a downgrade in some way (productivity, performance, re-work) for them now.

Ironically, the only thing I could see reasonably replacing Hack/HHVM for them is...PHP. Assuming PHP has some success adding all the typing, async, etc, features. They already addressed the performance differences vs Hack/HHVM.

Note: All in context of what it's used for, and the investments already made. I get you wouldn't choose Hack/HHVM as a new company.

Re: Ask HN: State of PHP at Facebook?

#47
post #26

Ex-Facebooker here. Hack isn't going away. Ever. It's actually quite pleasant to develop in. The tooling now revolves around VS Code, which I personally don't like. I wish they'd based this on a Jetbrains core. One thing I learned to love with the Hack type system is that nullability is a distinct type (eg you can assign a T to a ?T but not a ?T to a T; ? here means "nullable"). The static type checking is smart enou…

This is the second such PHP thread I've seen in the last 24 hours (the other one was on a different web property); gotta love people shitting on PHP like it's 1998

> This is the second such PHP thread I've seen in the last 24 hours (the other one was on a different web property); gotta love people shitting on PHP like it's 1998

I don't care for language wars (or the kind of petty language elitism that people get into with PHP), but: isn't Hack effectively its own language (and ecosystem) at this point?

I don't think that Facebook sinking tens of millions of dollars into a custom language dialect because on the initial technical decision to use PHP is a positive testament to it as a language. It instead suggests that Facebook bit the bullet.

Re: Ask HN: State of PHP at Facebook?

#48

The answer to your first question is yes. Your second question is based on an incorrect premise. Hack is internally built, but it is also open source: https://github.com/facebook/hhvm I joined Facebook in 2019 and left this year. Prior to FB, I worked mostly with python, javascript, and C++. Even at FB, I worked mainly in python (instagram backend), but spent a lot of time in the Hack codebase. My experience was that…

What issues does Typescript have? not saying it has none, just curious.

While much faster than python wouldn't nodejs be a bad option for FB/Instagram too? Why not Go?

Re: Ask HN: State of PHP at Facebook?

#49
post #26

Ex-Facebooker here. Hack isn't going away. Ever. It's actually quite pleasant to develop in. The tooling now revolves around VS Code, which I personally don't like. I wish they'd based this on a Jetbrains core. One thing I learned to love with the Hack type system is that nullability is a distinct type (eg you can assign a T to a ?T but not a ?T to a T; ? here means "nullable"). The static type checking is smart enou…

Does anyone use Hack outside of Facebook. Disclaimer: it’s been years since I looked at it and even at the time it was a very cursory look as PHP 7 was buzzing.

I believe Slack committed to it at some point, maybe they didn't get off it when Facebook announced they will not keep up with PHP itself anymore.

Re: Ask HN: State of PHP at Facebook?

#50
post #26

Ex-Facebooker here. Hack isn't going away. Ever. It's actually quite pleasant to develop in. The tooling now revolves around VS Code, which I personally don't like. I wish they'd based this on a Jetbrains core. One thing I learned to love with the Hack type system is that nullability is a distinct type (eg you can assign a T to a ?T but not a ?T to a T; ? here means "nullable"). The static type checking is smart enou…

Wow, that's almost the same thing that Typescript is to Javascript. Is all of that openly available to outsiders? If it is, I think I might to rethink my stance of php that I had for the last 15 years.

That feature is also part of the PHP language. Also as far as I know Hack is available to everyone.
Post reply on HN