Re:Pixie – A full-featured 2D graphics library for Nim
by PMunch on Monday September 13, 2021 @04:42AM
(#28509122)
> That's the weird thing about Nim. It's not really a new language so much as a syntax and front end to several existing languages.
This is a bit of an over-simplification. Nim does a lot of stuff on its own, so you won't be able to convert back from C to Nim for example. The most obvious being of course the macro system that is just normal Nim code but is evaluated at compile-time and generates code for you. In fact you can use the compiler to evaluate Nim without compiling it, so it certainly falls into the language in its own right category.
So I don't think it's far-fetched to emit C with hand optimizations if you really need them.
That's the weird thing about Nim. It's not really a new language so much as a syntax and front end to several existing languages.
If you compile in "-d:danger" mode turning off all checks and highest optimizations, the C code it spits out is pretty human readable even.