6 ms·
Nim transpiles to C, C++, or JavaScript so it can run on nearly anything (Windows, Linux, MacOS, embedded to some degree, web browser...etc). Cobra appears to b
by throwaway7645 9y ago
Nim transpiles to C, C++, or JavaScript so it can run on nearly anything (Windows, Linux, MacOS, embedded to some degree, web browser...etc). Cobra appears to be .NET, so a little more restricted I guess.
- carterza 9y agoCompiles... compiles. Edit - Sorry - that was rude. I should have elaborated. Transpiling is a specific type of compilation that involves two languages with a similar level of abstraction. Compilation involves languages with different levels of abstraction. Nim offers a much higher-level abstraction than C, thus you could consider the process of converting Nim to C, a compilation process rather than a transpilation process.
- throwaway7645 9y agoThis comes up everytime i post about this and most people agree with me that transpile means convert to a different source language. It is definitely a common use, but I realize it is a gray area. Edit: Compiling def isn't wrong, but Transpiling is more descriptive to me as it indicates you're not going to assembly or machine language or something like that.
- dom96 9y agoCompiling is the correct terminology here. Nim transpiles to JavaScript, but it compiles to C and C++. You don't say that Rust transpiles to LLVM IR, do you?
- felixangell 9y agoI would say compiles is a more general form of transpiles. Transpiling meaning it compiles into a higher level form i.e. c, C++, JavaScript, and compile meaning it compiles into a more lower level form i.e assembly, bytecode, etc? That's just how I look at it anyway.
- throwaway7645 9y agoMad respect for you Dom, but why would going from Nim -> JS be Transpiling and Nim-> C++ be compiling? Both go from a high level Lang to another high level Lang.
- dom96 9y agoI don't consider C/C++ high-level.
- throwaway7645 9y agoI would normally agree with you, but that seems subjective.
- dom96 9y agoIt is indeed a little subjective and changes with time. This Wikipedia article explains it fairly well I think: https://en.wikipedia.org/wiki/High-level_programming_language#Relative_meaning https://en.wikipedia.org/wiki/High-level_programming_languag...
- deleted 9y ago[deleted]