3 ms·
It doesn't have to be this way as is demonstrated in Guile.
by rekado 8y ago
It doesn't have to be this way as is demonstrated in Guile.
- kazinator 8y agoIt absolutely has to be that way, and is true for every language, including C. If you don't have a binary executable of a C compiler, you can't compile a C compiler, such as GCC. Since Guile requires C, you need a binary C compiler at the very least to bootstrap it from the bare minimum. Chez Scheme requires a compiled Chez Scheme whereas Guile requires a compiled C compiler.
- rekado 8y ago> Since Guile requires C, you need a binary C compiler at the very least to bootstrap it from the bare minimum. You do need a C compiler, but there is work underway to bootstrap the C compiler with ... a C compiler written in Scheme :) This Scheme interpreter (called "mes") can be built with the M2 Planet transpiler: https://gitlab.com/janneke/mes/ https://gitlab.com/janneke/mes/ https://github.com/oriansj/m2-planet https://github.com/oriansj/m2-planet
- rekado 8y agoI'd also like to point out that Guile can be bootstrapped with a Scheme interpreter (not just Guile), or it can be built with the interpreter in Guile itself, which is written in C. So there are a few choices here that increase the number of bootstrap paths through which one can arrive at Guile. I'd say that this is a desirable property as it allows for an elegant reduction of the bootstrap problem; conversely a program requiring a version of itself to be built has a much more complicated bootstrap story that either involves trust in large binaries or recursion into the early days of the compiler's first implementations. (GHC matches the latter story, unfortunately.)