6 ms·
I have to wonder why they're writing PHP compilers and PHP refactoring tools (in Haskell!) instead of just using something different for their front end.
by Zak 17y ago
I have to wonder why they're writing PHP compilers and PHP refactoring tools (in Haskell!) instead of just using something different for their front end.
- sanswork 17y agoAs a few facebook employees have said they have a lot invested in PHP there so it wouldn't make sense to swap it out.
- pmjordan 17y agoIt's interesting they haven't extended the language in the same way Fog Creek took VBScript/ASP, wrote a compiler for it and then started improving the language (a.k.a. Wasabi). I suppose PHP already implements practically every language feature you could think of (though the quality often divides the minds to put it lightly), so making it even bigger isn't going to make things better. Or maybe they have and it's kind of got lost in the hype.
- Zak 17y agoWith the sort of tech they're working on, a PHP -> something-not-evil compiler seems like a pretty reasonable solution.
- sanswork 17y agoAny sort of automated compiler is certainly going to miss out on a lot of the things that make language X better than PHP though would it not? And you're still talking about a rewrite of all their PHP code which I'm sure is no small feat. You're also ignoring dependencies and such in the form of PHP modules that would have to be redeveloped for the new language. Ensuring your front end developers are just as capable in language X(and handle the retraining/learning curve). Why go through all that trouble when PHP will work just as well for you?
- smokinn 17y agoI watched a video (Jeff Hammerbacher maybe? It was a long time ago back when he was still CTO) where the person mentioned that they had already tried to rewrite their frontend once in, I think, Python, but it was such a massive undertaking and would've frozen their product for so long that the project was killed.
- jhammerb 17y agoJust to be clear, I was never CTO of Facebook or anything close to it (thanks for that, though!). Dustin Moskovitz and Adam D'Angelo were the only two folks to hold that title that I know about. And yeah, I don't want to get in trouble, but ask the right people about "Team America"...
- smokinn 17y agoSorry for the title mixup, I saw the video of the talk you gave at Yahoo Brickhouse a long time ago. It was very helpful at the time; I was only just starting to get into user tracking and analysis. Thanks
- nir 17y agoMaybe they just don't think PHP is such a bad choice. Any comparable language would probably require refactoring/optimizing tools, so these aren't a reason to switch on their own, they have a lot of legacy PHP code and developers who are familiar with it, and PHP powers quite a few FB-sized websites.
- wakeupthedawn 17y agoThe opinion of some FB engineers is that if they could start all over, they probably wouldn't use php. The codebase is very large and somewhat of a hassle to maintain, but at this point it does not make sense to move off php. Facebook does have a faster php, but nobody is allowed to talk about it yet other than to subtly confirm its existence and that they're quite excited about it.
- dasil003 17y agoAlso, it's just the front end, which is PHP's strength.
- leftnode 17y agoBelieve it or not, PHP has come quite a bit in the recent years, and with some good developers, it's perfectly possible to write good, decent code in it.