Any programming language can theoretically be translated into any other programming language. This theoretical possibility says nothing about how simple it is, or whether any existing tools allow you.
This is also ambiguous, which is considered "decompilation". For example, I can use boost::pythonand embed a python program as a string in a C ++ program. Now I have a C ++ program that is completely equivalent to this python code. This is hardly considered a correct translation.
There are some things that a translator cannot do (well):
if ask_user():
a = 1
else:
a = "hi"
print(a)
Due to the ambiguity of the type of compilation time, any equivalent c-program must have some complex data structures with information such as runtime.
source
share