Why could they not use any mainstream language? Even if you claim that Hack is just PHP, it still begs the question, why PHP?
Any Turing complete language would suffice.
Yes, but with mainstream languages, you get rich libraries, tons of tools, best practices, idioms and experienced professionals for free.
But not all are equally unpleasant to work with. Some work well for small projects. Some for big projects. Some suck all the time. PHP is in the latter category, from my experience, with bad built in libraries, tons of gotchas, poor organization, version fragmentation, weak typing, bad tooling... Honestly, I like Python and JavaScript for many use cases but I struggle to see where PHP adds value. I like gradual-ish typing, like Python 3, and it is cool that was added to Hack, but struggle to see why a PHP-dialect language would be a good thing.
Performance is not bad and we already have a complete toolchain for it. No enough motivation to move away
Because they were built on basic LAMP stack back in the day
PHP allows for rapid development ...hack added typechecks and memoization etc ..at this point no off the shelf language will really work for large tech stacks like FB ... It will have to be customized ( scale/ Dev velocity ) ...FB has the resources to invest in hack and optimize it for Dev velocity which is what it values the most The real question is ...have you heard of anyone using mercurial ? ..
I remember when I was at Facebook tour my senior year and they mentioned that they are developing a compiler that compiles PHP to C++. That thing still around?
@bloomberg No, hack has an interpreter with JIT support (HHVM) now. Php to c++ didn’t work out cause the codebase is too yuge and no c++ compiler can handle that.
Because they like to pile on the misery.
Hack isn’t that bad, it’s closer to C# now, and high quality core libs and internal frameworks make it easy to work on.
They use php because they used php. Now they're stuck with it.
So you're telling me that they basically have almost two decades of tech debt? Also, most companies start out with some technology that they later upgrade. Amazon dot com was mostly Perl at the beginning.
There is a whole different world out there Microsoft. Not everyone is stuck with the stack they have.