1/ It's probably not the first thing you think of, but when we started .NET (COM+) in the late 90s, C# didn't exist yet. We were working on it at the same time as the CLR and the framework. So, you might wonder, what language was being used to generate IL and write the BCL?
2/ The answer is a language that we called SMC that Peter Kukol wrote the compiler for. Peter is a flat out amazing engineer and wrote the core parts of the compiler in just a few days. This unblocked the framework team, allowed vetting the runtime and interpreter, etc.
3/ SMC was a trimmed down C++ variant and the compiler was written in itself (i.e. SMC). It didn't support things like destructors, multiple inheritance, virtual base classes, etc. But, overall it enabled progress that would have otherwise been stalled.
4/ It did introduce a problem for the C# language and compiler team though. Every day more and more code was written in SMC, a language that we did not intend to ship externally. Designing a new language is hard (well, at least, a general purpose one that becomes popular).
5/ So there was a constant balancing act between laying enough of the foundation of the language and the C# compiler to replace SMC and making sure that the design lived up to the goals and ideals the team was striving for. If we waited too long to adopt C#,
6/ there would be too much SMC code written and we might not be able to reasonable port all of it. If we moved too early, the C# language wouldn't have time to bake and we would sacrifice the design aesthetic for expediency.
7/ Folks know how this ends - we eventually felt good enough about the state of the C# language and compiler to begin the migration and ultimately converted the entirety of the framework. The design team was incredibly disciplined and held a hard line
8/ on the design of the language. As far as I can remember there wasn't a single language concession that was made in order to 'rush', despite the pressure. That isn't to say there was no impact though. I'll talk about what it meant for the compiler and IDE in a separate thread,
9/ but there were a small number of features added to unblock the BCL and make migration easier. For example, the __ keywords, like __arglist, __makeref, etc. It also meant that the design team started the practice of meeting 3x a week for multiple hours a day to resolve design
10/ issues. Looking back, it was a heady time, stressful, but exciting.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Anson Horton

Anson Horton Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @AnsonHorton

26 Dec
1/ The C# development team, for V1, consisted of 5 individual engineers, a lead, and a couple of PMs. 4 of the engineers worked on implementing the compiler, and the last engineer worked on the Visual Studio integration (e.g., IntelliSense).
2/ The C# compiler was written entirely in C++ as was much of Visual Studio at the time. Everyone on the team wanted to implement the compiler in C#, but as I mentioned previously, expediency was key and when we started, we needed to bootstrap. That was done in C++, so it stuck.
3/ The compiler was largely implemented as a batch compiler. We had a no-release heap, which was extremely efficient for straight-through compilation and totally useless for interactive scenarios. Therefore, the compiler and what we call the language service were implemented
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!