3 ms·
It 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
by throwaway7645 9y ago
It 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.