is it possible to translate one language to another with an interpreter?
heard that quercus could translate php to java? at first, i thought it was a cheap lousy solution which could give code errors, but it seems that it´s fully possible to do so.
could you translate php to other languages, like python or ruby? c++ to java and so on?
Translating one language to another is just a special case for the class of programs called compilers, interpreters and translators.
This class of program will take a stream of input symbols ("source code") that can usually be described by a formal grammar and will output a stream of symbols.
That output stream of symbols can be:
The problem comes when you have idioms that don't translate well, either from or to. You get code that is syntactically valid, but looks like it was written by someone on acid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With