Are there any compilers out there for function or lisp-ish languages that compile to idiomatic C? Most compilers out there seem to provide something resembling a machine language composed of C macros. I'm wondering if there is anything out there that can produce readable C code based on a higher-level language.
Given that you tagged this question with Haskell I'll give a Haskell answer. JHC is a Haskell compiler which produces fairly idiomatic ansi-C. It's an optimizing whole-program compiler that can produce incredibly fast binaries. I'm not sure how stable it is at the moment though, and there seems to be limits to how big programs it can handle. But don't take my word for it, check it out yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With