Hacker News new | ask | show | jobs
by mduvall 5523 days ago
I'm curious - would it be inefficient to use something that could efficiently compile Ruby into PHP such as Fructose, and then use HipHop for PHP from Facebook to compile the PHP into C++? So far I don't see a lot of tools that utilize the Ruby->C++ direction, and much work has gone into HipHop for PHP.
1 comments

It won't work.

First, HipHop doesn't support create_function, which is used in the example.

Second, feature mismatch between Ruby and PHP will make efficient compilation quite hard and most likely be far from optimal. The languages doesn't seem to be very easily optimizable either.

HipHop isn't a silver bullet either: sometimes it seems to be faster than cached PHP bytecode, but not always.