Today I read about HipHop, the talk of the day in the PHP community. It is basically a PHP to C++ compiler, developed by Facebook to have all benefits of compiled binaries (improved performance, more efficient memory management, less overhead), without having to train their PHP developers into C++ developers or do a big round of fire-and-hire. They open sourced it today.
Very cool idea. But I can’t be the only one thinking “why doesn’t PHP work like this in the first place?”. Well, the answer is obvious. PHP might just not be the right tool for the right job if you need performance like Facebook desires. So Facebook thought of a way that cheap (and apparently not such good) PHP developers, building (somewhat) crappy code, combined with a ginormous code-beautifier, actually gives superperformant binaries, as if they had highly educated C++ programmers on the job.
There’s only one word for this. Brilliant. No sarcasm intended 🙂
I’m very curious where HipHop will be in a year time. I’m also very curious if HipHop 2.0 will compile into assembly code. And if HipHop 3.0 will compile directly into binaries. And if HipHop 4.0 will actually be a virtual machine, interpreting bytecode files and comes with a JIT compiler. Oh wait…