How can I say in english, that programming language can be compiled to other programming languages?
The example can be Haxe. On the website the language is decribed as "Multiplatform":
Multiplatform: Haxe can be compiled to all popular programming platforms with its fast compiler – JavaScript, Flash, NekoVM, PHP, C++, C# and Java (soon)
but multiplatform can be misunderstood as hardware or software platforms (win, mac, linux).
So what is the most suitable word describing this ability?
-
3I would remove "compiles" and simply say that this programming language can be transformed into another through use of some interpreter.Neil– Neil2013年04月16日 12:57:17 +00:00Commented Apr 16, 2013 at 12:57
-
6You could use the same word as you would for regular languages: translate, translator. It is clear, and I've heard the word being used in this sense.superM– superM2013年04月16日 12:59:52 +00:00Commented Apr 16, 2013 at 12:59
-
4@teresko How so? The only way I could see you argue that is you using an overly restrictive and useless definition of compilation (which restricts the output to machine code).user7043– user70432013年04月16日 13:35:45 +00:00Commented Apr 16, 2013 at 13:35
-
18@Neil: transforming a program written in one language into another language is not interpretation. In fact, this is the definition of compilation.Jörg W Mittag– Jörg W Mittag2013年04月16日 13:49:03 +00:00Commented Apr 16, 2013 at 13:49
-
2@Neil, compilation, by definition, is a transformation from one language to another. And "transformation" sounds equally obscure and arcane as "compilation", as long as your reader is not well versed in term rewriting and such. So I would suggest using the word "targeting", e.g., "Haxe is targeting JavaScript, Flash, whatever, and such".SK-logic– SK-logic2013年04月17日 08:29:14 +00:00Commented Apr 17, 2013 at 8:29
6 Answers 6
The usual term is "transcompilation" - not a common term, but the technically correct one. It's not just for trendy new scripting languages (CoffeeScript -> JavaScript) either; the first C++ compilers were in fact transcompilers to C.
-
2Also "transpiles" as in "The transpiler transpiles CoffeeScript into Javascript"user7007– user70072013年04月17日 01:12:22 +00:00Commented Apr 17, 2013 at 1:12
-
4I have never heard this term before, being in the field for decades. Mind pointing to its origins (a link to the first paper where it appeared would be the best)?SK-logic– SK-logic2013年04月17日 08:31:55 +00:00Commented Apr 17, 2013 at 8:31
-
From Wikipedia: "A source-to-source compiler [aka. "transcompiler", "transpiler"] translates between programming languages that operate at approximately the same level of abstraction, while a traditional compiler translates from a higher level programming language to a lower level programming language."l0b0– l0b02013年04月17日 08:55:29 +00:00Commented Apr 17, 2013 at 8:55
-
4@l0b0, wikipedia does not comment on the origins of the term, and it is definitely never supposed to be an original source.SK-logic– SK-logic2013年04月17日 09:04:49 +00:00Commented Apr 17, 2013 at 9:04
-
3...searching "transcompilation" on google doesn't yield any related result...Bakuriu– Bakuriu2013年04月17日 10:03:50 +00:00Commented Apr 17, 2013 at 10:03
Sorry gents, but the word for this is just "compiled". It means turning one type of code into another type of code. It makes no real difference if that code is English, C++, x86 machine code, ARM machine code, Java, bytecode, or back to English. We generally use it to mean the trip from programming language to machine code, but that's an aspect the word has gained over time. And hey, if enough people start using a word incorrectly, it DOES indeed gain that new meaning. But if you want a word for turning Haxe into C++, the word is "compiles".
Multiplatform: Haxe can be compiled into all popular programming languages with its fast compiler – JavaScript, Flash, NekoVM, PHP, C++, C# and Java (soon)
(Also, I'm ignoring Merriam-Webster, because they're stupid because they disagree with me... hmmmm)
Maybe this is a question for https://english.stackexchange.com/ yet I would say that the process of compiling includes compiling to another high level language and is not only limited to compilers that compile towards native machine code.
As a word "Compile" is not specific to computer compilers at all and is quite general. "Compiling a table" or "compiling a list of names" comes to my mind, therefore it is broad enough for a lot of purposes (text processors like Latex compile as well, etc.). To be more specific about the target of the compiliation I would use to-source-compiler
Now for the specific example, I think that platform is an appropriate word to use. Since human languages are inherently ambigeous you have to use redundancy (examples, paraphrasing with other words, explaining) to get the point across if in doubt.
I would also read the "Haxe" statement in a way that includes standard libraries and similar things. I.e. in that case plattform would be a superset of "language" and you could separate it from that by calling it "software development platform" etc.
-
4I think you mean english.stackexchange.com?Suman– Suman2013年04月16日 17:16:58 +00:00Commented Apr 16, 2013 at 17:16
You can say that a compiler has languages X, Y, and Z as translation targets, or design a language with those targets in mind.
I would say that compiler by definition translate into different programming language (at least this is definition I know - program that transforms one language into another). For example most C compilers produce assembly as output. Assembly compilers takes this output and transforms it into the binary code which is also a language (sure - probably no one writes writes in it during past 40 years or more but technically it is language) - which can be taken and recompiled to say micro-ops by processors (or there are certain operations done by linker on object files). Similarly the javap
compiles into bytecode. Usually at the end of such chain there is interpreter which executes the final code (be it CPU, GPU or executed program). There is 'no such thing' as machine code as modern x86 recompiles the programs into internal operations (micro-ops) and I'm perfectly capable of treating ARM machine code as interpreted language on x86 or other way round (in some cases even recompile from one form to another).
Haxe is source-to-source compiler as it does not transforms the higher-level language into lower level one as the previous examples. It doesn't seem to address directly your problem of multi-platform ambiguity but unfortunately I don't think there is practical way of differentiation between those two things - the APIs are kind of languages which can be in general interpreted, recompiled etc.
First thing first: I don't know whether there is already a suitable word for this feature.
But maybe it could be called multilanguage? Or languageagnostic? Since it is more about the programming language, then the mention of 'language' in the name could make it more obvious than multiplatform.
Of course language is ambiguous as well, as it could be understood that the source code can be written in any real world language (for example because variables can be written in unicode).
On the other hand every seasoned programmer will probably recognize such a construct as different from localization or internationalization, so they might 'get' it more easily.
Just my 2 cents.
-
i do not think that is accurate; and if you see the fact the site likes only factually correct answers. but welcome to the community and hope you answer some more where you are sure about the answer :)tgkprog– tgkprog2013年04月16日 13:25:26 +00:00Commented Apr 16, 2013 at 13:25
Explore related questions
See similar questions with these tags.