← Back to context

Comment by kyllo

11 years ago

They wrote the original C# compiler in a different language (probably C++) first.

Then they wrote the second C# compiler in C#, and used the first compiler to compile the second compiler. Voila!

We regularly dogfood, so we're on like N iterations of your structure, but that's the idea!

  • Could you ask around the office and find out some of the details about the C# bootstrap process? I would be fascinated to know what language the non-C# compiler was written in and also how long they used/improved the non-C# compiler until they switched to the C# compiler.

    This source release is so cool!

    • Oh, the old compiler is just the currently shipping compiler (i.e., the one in a clean install of VS 2013). We've been using and maintaining it since the beginning. It's written in C++, so we refer to it as the "native compiler."

      We only stopped bootstrapping using the native compiler about, oh, 6 months ago, since that was when we decided to take a dependency on new language features. The next VS will be the first VS where Roslyn is the default C# compiler.

      1 reply →