On Tue, 20 Feb 2001, Neil Conway wrote: > On Tue, Feb 20, 2001 at 01:26:58AM +0900, Mathieu Bouchard wrote: > > For as long as I've been thinking about writing a compiler, I've > > considered metacircularity as an essential feature. > Excuse my ignorance (as a pre-CS person), but why is metacircularity > an "essential feature" of a compiler? What do you gain? It's an essential feature because it's very groovy. > I've always thought that it leads to problems with bootstrapping > the build process, and Ken Thompson's interesting cc-hack. What am > I missing? Bootstrapping the build process is a problem if you don't have a portable low-level language and/or if you don't keep the output of your high-level compiler (written in that low-level language). Ken's "Trusting Trust" scenario works if the output of the compiler can be considered unreadable. This is usually due to the notation of the output (machine language) or the size thereof. Those two issues may be addressed. First of all, the presence of a C compiler is assumed. If Ruby code can be compiled to C it can be read (at least more easily than machine language), and it can be compiled to machine language. Second, the size of the looping C chunk needs to be small. That's what I'm trying to work on mostly... Whether I get to "real", complete metacircularity or not, is not really an issue for me. I'll be happy when the C part is small enough. Well, maybe I just abused the term a bit here. I just want things to be in the highest level each of them can, remodularize things, etc. matju