Re: Language Design Question: Backend C vs LLVM IR

2019-06-15 Thread kartoffel
Thank you for your answer. Nevertheless, Nim translates to C, C ++ and others. 
Why? To offer better interoperability with C besides C ++? And what are the 
differences in performance? Is C ++ generally faster than the target? And by 
what percentage is a program written in Nim slower on average than direct 
writing in C or C ++?


Language Design Question: Backend C vs LLVM IR

2019-06-14 Thread kartoffel
Why is Nim translated to C and not to LLVM IR (eg like Rust)? What are the 
advantages / disadvantages?

I think that as a programmer you can already master C and thus optimize it 
better than doing it in a completely new language like IR. In addition, the 
whole LLVM framework is very extensive and complicated. On the other hand, does 
the IR allow more possibilities as an intermediate language?