C# Compiler Lead Jared Parsons on 20 Years at Microsoft
After 20 years at Microsoft, Jared Parsons took a kind of victory lap. Parsons has appeared on three different podcasts over the last two months, looking back over his nine years as Microsoft’s principal developer lead on the C# programming language.
Just hit my 20-year anniversary at Microsoft. It’s pretty daunting to look back at all the products and features I’ve worked on over the years and where they are now. The good news, though, is I’m still having fun ;) pic.twitter.com/To7DmkcYGf.
—Jared Parsons (@jaredpar) January 29, 2024
On the Software Engineering Daily podcast, Parsons remembered the experience of open sourcing C# — and all the procedures they’ve implemented since to keep their developer base happy. And he’s seen a lot of changes. Back in 2004, release cycles were “somewhere between two and five years” — though now they happen annually, and “Visual Studio ships about four times a year.”
Parsons remembered a new developer complaining about missing the ship window for a feature they’d been working on. “I used to have to wait five years when I missed my ship window. It’s the context of different eras.”
It all offers a unique perspective on the life of a programming language — not just how it changes, but also how those changes can be fostered, organized and optimized.
Building in the Open
C# was created at Microsoft in 2000 — and open sourced in 2014. On the Azure DevOps Podcast, Parsons confirmed that the entire compiler is now open source — along with the “ecosystem” around it (including debugging tools and Visual Studio’s C# functionality).
The Software Engineering Daily podcast thought to ask if Microsoft’s 2014 move to open source impacted Parsons’s work. “Enormously,” he replies. “On so many different levels.”
Even just moving to GitHub repositories, “You’re shifting a culture that has been non open source for its entire life…”
Parsons was part of that team that made it happen and remembers “months and months of work to just undo things. Like, your build system has all these subtle dependencies on internal systems? Ripping those out… This is all building in the open. We have to now find replacements for all these tools, these libraries, these services.”
And there was also another challenge: “Finding code which is not open source-friendly that you have to get out of your system. It’s like, ‘Nope, can’t ship that library. That’s not an open source-friendly library. We have to lift and shift over to here.’” Parsons estimated that it took “a couple of years until we got good at building out in the open, and dealing with these dual builds — we’re building in the open, but we also build internally for shipping purposes.”
Has it made the product better? “Oh, absolutely.”
Parsons noted how easy it is now to install C# fresh from its repository. “If you want contributions and you want people to participate, the entry point to building and running your code has to be as small as possible. And so we very deliberately went to the open — put a lot of emphasis on ‘How do we make this easy? How do we make it the simplest possible?’ … And so it is definitely a better product in terms of that respect.”
For C#, new compiler features can now be added as “preview” features in Visual Studio to start getting feedback from lots of actual users. “That’s something that has been enormously successful for us,” Parsons said on Rockin’ the Code World. “It allowed us to get tons of feedback… One thing we always find is customers are infinitely more creative than we give them credit for…”
It’s a process they take very seriously. “When we ship something, we’re going to be maintaining that forever. These are forever decisions. That is daunting at times.”
Compiler as API
There’s another way the compiler team is supporting the larger community. In February, Parsons appeared on the YouTube show Rockin’ The Code World with dotNetDave, and described the compiler itself as “a very boring thing — it’s a thousand lines of code — and most of that’s talking to the server… What the compiler team really focuses on is our libraries and APIs, around providing semantic information, syntax trees and basically allowing people to write inspection tools on top of C#.”
Or, as Parsons explained on the Azure DevOps Podcast, “We really say we build an API. We have this little library that allows you to inspect code, generate diagnostics, and — every now and then — emit some code to disk. The C# compiler is like a thousand lines of code that just calls into the library.”
But meanwhile, “The IDE team builds their entire experience on top of our library” — with no special treatment. “And that helps us ensure we can have this beautiful tooling experience around the language.”
But this has ramifications for the entire C# ecosystem. On the Software Engineering Daily podcast, Parsons explained that the compiler then also ends up supporting plugins — like analyzers to generate warnings for a customer’s own domain-specific rules. It also ultimately ends up underpinning Microsoft’s Visual Studio, Parsons said, as well as “all kinds of other tools around Microsoft,” that “the entire Visual Studio experience is built on top of the compiler as an API.”
“Strangely, it’s like, our first job is actually thinking of ourselves as a library and thinking really, like, how can we help the IDE team build a very fluent and beautiful experience for C#?”
Looking back over the years, Parsons remembered when people around Microsoft were creating their own tools for analyzing, formatting and bug-checking their C# code. “We found, I think, something like, 10 to 20 different C# parsers and binders in the company of varying degrees of accuracy.” So around 2010, “a portion of the team forked off for a number of years to re-engineer the compiler as a library approach and then rebuild our IDE services and batch services on top of it… It was a pretty big bet back then, and it took about five to six years to come to fruition, but it was definitely very much an inflection point in the development of the language.”
But soon they’d discovered the biggest advantage of all. People start building even more useful things on top of their API.
One example was the browser-based tool SharpLab, which lets users write and analyze code snippets. “We didn’t build this… It’s one of these things where they built it, and it’s now one of the most important tools for the C# compiler team!”
The discussion led Parsons to an interesting aside. “Languages that just have compilers — are toys. Languages are defined by the ecosystem of tools that support them.”
Testing
And of course, part of their mission is a lot of rigorous testing. “It depends on the day, but between four to eight times a day, we change the C# compiler,” Parsons notes. “As we merge pull requests into GitHub, within about four hours, we’ve produced a new compiler. And about eight hours later, that compiler has built Visual Studio.”
On Rockin’ the Code World, Parsons added, “We run about 750,000 tests on every pull request,” since C# ships on so many different platforms and architectures.
Parsons pointed out that a lot of Microsoft services today, even within Azure, are written in C#. So focusing on improving performance “can have massive multiplier effects for the company,” as well as for its customers.
“Release after release .Net saves the company a ton of money,” Parsons said on Rockin’ the Code World, “because these big Azure services… even these tiny improvements when you scale it up to those massive services? Millions of dollars of differences. It’s huge.”
FEB 3RD: Jared Parsons, Principal Software Engineering Lead at Microsoft, is back for round two! Join us as he discusses shipping the C# compiler, language design, and more. 🔗 https://t.co/84EejHFgri@CSharpDotTV @realDotNetDave @jaredpar pic.twitter.com/Olm3koZRjb
—RockinTheCodeWorld (@RockinCodeWorld) January 24, 2024
—
The Art of Language Design
What’s next for C#? On Software Engineering Daily Parsons said, “We’ve got a number of performance features we’re working on,” including improvements to Span<T> (which represents contiguous regions of memory).
They’ve been “establishing the building blocks” over the last few releases to create “a zero-alloc overhead variable argument calling format in C#, which is really exciting.” And they’re also hoping to release a new “productivity” feature with implicit and explicit extensions that “we’ve been incubating for a couple of years now.”
What influences C# design decisions? “We actually look at other languages and ecosystems a lot,” Parsons said, adding, “Languages are a competitive space.” Parsons even admitted that compiler design is easy — and what’s hard is the aesthetics of a programming language.
In his 15 years on Microsoft’s compiler teams, he’s learned how to teach compiler design — which he describes as essentially “an engineering problem.” But to become a good language designer is “such an aesthetic thing… It’s an art. It’s very hard.” Even after 20 years, Parsons has learned that “some people have a very natural gift for it. Some people can be taught. But it is definitely something that it’s much more of an art sometimes.”
Happy and Hopeful Future
So after 20 years at Microsoft — what keeps him interested and engaged?
Toward the end of his appearance on the Software Engineering Daily podcast, Parsons looked back on how he’s held different roles over the years, and “there’s just so many different problems to solve.” Besides being the compiler lead for C#, he also works on the infrastructure for .NET — and even there, “We’re always constantly changing what we’re working on.”
Got my 20 year glass today pic.twitter.com/Kzg1eFVnXY.
—Jared Parsons (@jaredpar) March 13, 2024
Whether it’s ML or AI, Office programming or boosting C#’s performance, “one of the nice parts about being in the languages space is that I get introduced to all these different problems. And I can get these little tidbits of fun that I can pull into my day, learn a little bit and kind of move on to get the next little tidbit.
“And also? The .NET team is just fun. We have fun problems. We have a really good culture. It’s just a really fun team to be on.”
Just hit my 20 year anniversary at Microsoft. It’s pretty daunting to look back at all the products and features I’ve worked on over the years and where they are now. The good news though is I’m still having fun ;) pic.twitter.com/To7DmkcYGf.
—Jared Parsons (@jaredpar) January 29, 2024