Facebook as a company do not believe in ever rewriting large code bases. You can view lots of their open source/technical achievements as out growths of this belief:
- 2004, write PHP as it's fastest for now
- 2008: PHP is too slow, compile it to C++
- 2011: C++ is too slow, write a VM and compile to assesmbly
- 2012: PHP's type system sucks, write a better typer in OCaml (Hack)
- They have done much the same for Javascript and Python (look at all the typing tools provided by Instagram).
This stuff is just an outgrowth of their deep deep belief in writing code to handle the crazy amount of code they already have.
I think the theory is a small subset of engineers can do work that speeds up the entire codebase for the rest of the engineers instead of spending time rewriting that entire code base and also retraining all of those engineers.
I think this is just it; at some point, code becomes a numbers game, an investment game. Rewriting their PHP codebase to, say, C++ would cost 10000 work-years, whereas creating HVVM cost 100 (random numbers) at a 1000% improvement in performance.
Rewrites at that scale are really expensive and take forever, and by the time it's done they'll be running behind the facts already.
- 2008: PHP is too slow, compile it to C++
- 2011: C++ is too slow, write a VM and compile to assesmbly
- 2012: PHP's type system sucks, write a better typer in OCaml (Hack)
- They have done much the same for Javascript and Python (look at all the typing tools provided by Instagram).
This stuff is just an outgrowth of their deep deep belief in writing code to handle the crazy amount of code they already have.