4 ms·
> transpiles can we get rid of this web dev made up word already? It should be "compiles".
by ghrifter 9y ago
> transpiles
can we get rid of this web dev made up word already?
It should be "compiles".
- throwaway7645 9y agoIt transpiles to C, which then compiles to machine code. I think Transpiling is the right word here. I guess you're right that you can compile to anything, but "transpile" seems more descriptive.
- xyzzyz 9y agoCompiling is literally translating from one language to the other, usually simpler one. There historically has been tons of languages compiling to C (e.g. various Schemes), and there was no need to invent a new word for it.
- winebot 9y agoOne of the great things about natural language, is that we can create new words, in order to arrive at more fine grained meaning. I personally can appreciate a difference between a compiler that takes source code in one language and generates source code in another high level language, and a compiler that takes a source file outputs a binary. Granted, there are a lot of situations where there is no need to make a distinction, but that's not always the case. An analogy might be the use of the words car and taxi. Cars and Taxis are both vehicles. In fact, a taxi is often a car. In some situations, I might say "I went there by car" - and that would be sufficient. But if the situation demanded I express the fact that the car that I traveled in was a taxi, I would say "I went there by taxi" (Not "I went there by a car that is owned by a freelance driver who charges by the kilometer")
- johncolanduoni 9y agoHowever it was rarer in the past for the intermediate language to be distributed, as is the case with compilation to JavaScript.
- throwaway7645 9y agoAgreed, but like a child comment said, this is a lot more popular now, and new words pop up all the time in natural languages. I get your point, but to me it adds clarification in Nim's case as compilation could mean going to JS, C, C++, or we could be talking about the part where that is passed to gcc or the web browser or whatever.
- pjmlp 9y agoWhen using a classical C compiler, the code is transpiled to Assembly, which is then finally converted to binary via the Assembler. This is why this "word" doesn't make any sense.
- shakna 9y agoSo far as I can recall, "transcompile" has been around a while. I think I can remember seeing it in some of the DOS documentation. However, transcompile simply means source-to-source compiler. A subset of compilers. Not all compilers take in source and spit out source: They can also output binary information. So, the shortened "transpiler" doesn't hide that it is a compiler. It just means you get source code out, and put source code in.
- pjmlp 9y agoSo classical C compilers are also transpilers and we should refer to them in this way, as they do source-to-source conversion from C text code into Assembly text code.
- shakna 9y ago"Transpile" is simply more specific than compiler. You can refer to them in this manner if you wish to be more specific, but compiler is still okay, as transpilers are just a subset. (The C ASX compiler, when converted to .ast, was referred to as a transcompiler.)
- tomjakubowski 9y agoWhat's wrong with inventing new words to clarify meaning? The C preprocessor is also "just" a compiler but no one calls it that, for good reason. A disassembler is similarly "just" compiler, but no one calls it that. And, as sibling commenter noted, "transpilation" is a concept that predates the web itself, let alone "web devs."
- johncolanduoni 9y agoI think "compilers for which both the source and target languages are usually written by humans" is a useful category. They face some fairly unique issues, like having to plan around a second optimization pass geared towards human, not machine, output. I'm not sure why it's such a big deal to you the particular word used, since it AFAICT was never used to mean anything else.