Hacker News new | ask | show | jobs
by whitenoice 3893 days ago
Nice writeup, can anyone explain why fb continues to use php over other statically types languages? I understand they have a huge code base with php, but with so many awesome engineers at work is it not possible to migrate slowly? Or is it because they are really productive with php?
4 comments

FB engineer here. We did migrate slowly, to Hack http://hacklang.org/. It's a typed dialect of PHP, notably with full backwards compatibility, so we didn't have to rewrite all of our code as we converted over and added types. I haven't looked at the stats in a while, but last I checked, well over 99% of our files were marked as having some type information, and a very significant proportion of that was becoming fully statically typed. Basically all new code since the end of 2013 has been mostly, if not completely, statically typed.

I'm actually giving a talk at OOPSLA this week about how we went about actually doing the conversion (everything from how we approached designing the system to how we convinced engineers to use it), if you or anyone reading this happenes to be going. http://2015.splashcon.org/event/splash2015-splash-i-josh-wat... I think it will also be recorded.

> Nice writeup, can anyone explain why fb continues to use php over other statically types languages?

When you have a large existing codebase in one language, migrating it to a new language means a massive amount of time wasted retraining engineers, rewriting code, etc. You lose a lot of productivity and spend a lot of money for possibly little gain.

Well the made the hack language, which is php with types. I don't know how much they use it, but it seems like that is at least a move in the right direction.
It could have something to do with their hiring process being a large machine for producing 'cultural fits' which means, people who think exactly like they already think. They have 3 or 4 layers of interview, followed by candidates attending a bootcamp where they are indoctrinated into the One True Facebook Way.