[Mono-dev] C# Compiler - Chicken and the Egg

Miguel de Icaza miguel at ximian.com
Thu Mar 9 16:16:49 EST 2006


> I was reading online that Mono's C# compiler is written in C#. That
> made me woder, how did you compile the Mono C# Compiler for the first
> time. (This is the old chicken and the egg problem.) I am wondering
> how this obstacle was overcome, and why the compiler wasn't written in
> a language like C, that could already be compiled on Linux.

I wrote the compiler using Microsoft's C# compiler.   I did this for a
number of reasons:

	* Increased productivity, I have wasted too many hours of
	  my life with C, and there was no point in sacrificing more.

	  With C# I was incredibly productive.

	* I got to learn the new lingua-franca of .NET

	* It was a good test of bootstrapability.

I spent a few months making the C# compiler compile itself on Windows.
At the same time the runtime/JIT people worked rapidly to get the JIT to
a point where we could run the C# compiler executable on Linux.

You can read some more details about the history here:



More information about the Mono-devel-list mailing list