3 ms·
C is not ideal for this task, but last time I checked FB is run on a combination of C++ and PHP.
by dvfjsdhgfv 6y ago
C is not ideal for this task, but last time I checked FB is run on a combination of C++ and PHP.
- dharmab 6y agoThere's more than that. PHP, Erlang, C++, Java and a smattering of others.
- konjin 6y agoYes, and they had to built their own php to c++ transpiler, then virtual machine and finally their own language. Truly the real man solution. The only way this could have been better is if the vm for hack was written in brainfuck.
- dvfjsdhgfv 6y agoI'd say it was probably the optimal solution, allowing them to scale more or less gracefully. It might not be the most elegant, but it definitely works, and at that scale it's an engineering feat. I get why people hate C, but once you get used to a couple of good libraries things get much easier - we're not in the 90s anymore and there's plenty to choose from, with some of them having excellent quality code. And especially in cases like these when it turns out you can get some benefits from delayed freeing of memory C's manual memory management is an asset.