Live data from Hacker News

Ask HN: State of PHP at Facebook?

news.ycombinator.com

51–60 of 88 posts

Re: Ask HN: State of PHP at Facebook?

#51

Earlier quoted context omitted.

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.

I don't think that anyone who uses Javascript as part of their backend stack has any room to criticize.

Nodejs is a solid server runtime these days, widely test by big companies with big traffic as their frontend servers. And there is a mature option for static typing if you want that.

Re: Ask HN: State of PHP at Facebook?

#52
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

I assume this thread was inspired by the other one.

I too am actually interested in the current state of PHP jobs. I previously assumed it mostly entailed working on legacy projects, which is what I do occasionally.

I have a younger friend who is primarily interested in working with PHP. I wanted to advise against pursuing it too much due to questionable future prospects, but he’s found gainful employment in a couple of PHP shops.

The knowledge is transferable to other languages anyway, so even if PHP jobs do dry up in the near future, it won’t have been a waste.

Re: Ask HN: State of PHP at Facebook?

#53
post #29
post #24

Has anyone used both Hack and the modern React workflow of Typescript and a mixture of client and server-side rendering? Interested to know how they compare

I haven't seen a huge emphasis on SSI + client other than projects like Next (which is ok but kind of clunky). My experience with Hack was that it was just server-side ... is there some front-end aspect to Hack?

[deleted]

Re: Ask HN: State of PHP at Facebook?

#54

Hack is open source. My understanding from a talk back in 2014, is hack was developed because of frustrations with PHP evolution. Honestly I think it may have lit a fire under the PHP developers because php7 had significant speed improvements[4]. Talk: "Facebook recently introduced and open-sourced Hack ( https://code.facebook.com/posts/264544830379293/hack-a-new-p... ), a gradually-typed programming language for HHV…

I used HHVM for a while and it was good before PHP7, but then it quickly became irrelevant once the PHP core and community got their act together.

Re: Ask HN: State of PHP at Facebook?

#56
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…

> The tooling now revolves around VS Code

When I was there a couple of years ago, doing Hack development using vim was well supported. Not as slick as the official IDE, but more than good enough for my day to day tasks.

> There's literally no reason to justify the massive investment a complete rewrite would be, like literally none. It's not even close.

Definitely, and my (relatively ancient) background is as a PHP-mocking Perl developer.

In the end, the tooling is far, far more important and relevant than the language, and the tooling at Facebook is better than anything I've seen elsewhere, by a long shot.

Re: Ask HN: State of PHP at Facebook?

#57

Earlier quoted context omitted.

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.

I got a 500 error with stack trace mentioning a hack file from slack last week.

Re: Ask HN: State of PHP at Facebook?

#58

Yes www still uses hack. No we probably won't ever migrate to another language for www. That being said, I don't think anything BUT www is written in hack.

> That being said, I don't think anything BUT www is written in hack.

I was at FB a few years ending in 2020.

Wherever I work, I end up doing a fair bit of 'code/tech archeology' just for fun and curiosity's sake. While WWW is the vast majority of Hack, I did see it in active use and maintenance in a number of other areas.

Pretty interesting stuff really.

Re: Ask HN: State of PHP at Facebook?

#59
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…

> The tooling now revolves around VS Code When I was there a couple of years ago, doing Hack development using vim was well supported. Not as slick as the official IDE, but more than good enough for my day to day tasks. > There's literally no reason to justify the massive investment a complete rewrite would be, like literally none. It's not even close. Definitely, and my (relatively ancient) background is as a PHP-mo…

Are you able to share some more about what makes the tooling at Facebook so great?

edit: typo

Re: Ask HN: State of PHP at Facebook?

#60

Earlier quoted context omitted.

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 assume this thread was inspired by the other one. I too am actually interested in the current state of PHP jobs. I previously assumed it mostly entailed working on legacy projects, which is what I do occasionally. I have a younger friend who is primarily interested in working with PHP. I wanted to advise against pursuing it too much due to questionable future prospects, but he’s found gainful employment in a couple…

I haven't checked recently, but PHP jobs tend to pay less than other languages. I've also been at interviews where the interviewer mocked PHP and I would probably have been marked lower if I tried to write my answers in PHP.

Overall, PHP has matured a lot in recent years and gained in features that was missing from other popular languages (e.g. Composer/Packagist, Laravel, PHP 7 and PHP the Right Way probably contributing the most).

Post reply on HN