3 ms·
has anyone created the opposite? Compile PHP into Ruby? (Did I just feel all of the HN rubyists shudder at once?)
by erik_p 15y ago
has anyone created the opposite? Compile PHP into Ruby?
(Did I just feel all of the HN rubyists shudder at once?)
- StavrosK 15y agoHell, I'm a Pythonista and I shuddered nonetheless.
- swivelmaster 15y agoI've actually played around with this concept. Conceptually it's not very difficult (or at least it wasn't for the code I was working with)... The biggest issue is PHP's reliance on global functions vs Ruby's methods for strings, numbers, arrays, etc. So, for every PHP global string function, for instance, you'd need to pull out one of the arguments and call an equivalent method on it. Bleh.