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.
I only found a C->C++ converter. I'm not sure that you can convert most functional languages to LISP. The structure and syntax doesn't match up very well. I'm sure that you could find many converters for C++ though.
For Common Lisp there is currently only one widely used compiler that compiles to C: ECL. You would need to look if the output it is readable enough.
Years ago a company sold a Common Lisp compiler for exactly this purpose: compiling Lisp to 'maintainable' C. The compiler was very expensive. It is no longer available, but it still seems to be used in one or two companies: Lisp to C .
The haskell compiler built-in compiles to C. Although IIRC it isn't that pretty looking.
(Checked, 162 lines for main = putStrLn "Hello, World!"
Edit: GHC of course.
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.