4 ms·
There is a Scheme compiler called Stalin[1] which apparently does some very sophisticated full-program and lifetime analysis. This of course leads to very long
by AngrySkillzz 11y ago
There is a Scheme compiler called Stalin[1] which apparently does some very sophisticated full-program and lifetime analysis. This of course leads to very long compile times, but the code is also very fast compared to other Schemes, and even C in some cases, from the benchmarks I've seen[2][3] etc. You can find more benchmarks for it, and similar compilers like MLton.
Of course, I can't comment on whether or not it is actually usable in a real-world environment, just that the techniques do exist.
[1] https://en.wikipedia.org/wiki/Stalin_%28Scheme_implementation%29 https://en.wikipedia.org/wiki/Stalin_%28Scheme_implementatio...
[2] https://justindomke.wordpress.com/2009/02/23/the-stalin-compiler/ https://justindomke.wordpress.com/2009/02/23/the-stalin-comp...
[3] http://www.ffconsultancy.com/ocaml/ray_tracer/languages.html http://www.ffconsultancy.com/ocaml/ray_tracer/languages.html
- fanf2 11y agoA more recent example of a whole-program functional programming language compiler is Haskell's jhc http://repetae.net/computer/jhc/ http://repetae.net/computer/jhc/