Is there a language that is designed with one-way translation into more than one other popular language?

StackOverflow https://stackoverflow.com/questions/9400545

  •  29-10-2019
  •  | 
  •  

Question

CoffeeScript gets converted to JavaScript, Groovy to Java.

Is there a language that was designed to allow its functions to be converted into multiple languages?

One could write string manipulation or HTML snippet generation that could be used as a library, but if a similar requirement is found in another language, the functions of that library would need to be translated.

Is there such a language that includes two or more translation targets already?

I am mostly interested in Java, JavaScript, Perl.

I would be interested in C/C++, but only if there were safeguards to prevent buffer overflow vulnerabilities from being created.

Was it helpful?

Solution

What about Haxe? C++, Flash, JavaScript, and more.

OTHER TIPS

UML - Unified Modeling Language, has several tools that can translate into C++, Java, and others. That's not really a "language" like C or Java, however. It's all diagrams.

I don't know much about other languages, but the Java bytecode, when the compiled with the right flags in javac, contains debugging information like line numbers, variable names, and (I think) comments. Unobfuscated Java bytecode can be decompiled into pretty readable source code.

I think what you're looking for is LLVM. Also, this similar question may be relevant.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top