This article is more than 1 year old

Mads Torgersen and Dustin Campbell on the future of C#

How has open source changed it - and can it survive Windows PC decline?

Avoiding over-complexity - and the Microsoft taint

As you add features, how do you avoid the risk of the language becoming over-complicated?

Torgersen: It is a real risk. I sometimes joke about language evolution, if you do too little of it, you become a dinosaur, because you can’t address today’s problems as the field evolves, and if you do too much of it, then you explode in complexity. Either way, sooner or later you get to one or the other. It’s a matter of playing a game of staying in between.

We’re totally bold about, if the language needs something to stay relevant to today’s users, we will do it, but we will also be very deliberate about, do things carry their weight. If there’s an opportunity to do a feature with a new syntax or do it by generalising an existing syntax, we always pick the one that has less new impact.

Campbell: You don’t want to get into a place where the users of the language are bifurcated because one set of people says, I just use these features, because this side of C# is crazy. You end up with code bases out there that look very dissimilar but still C#.

Nested functions and Tuple returns, two new features in C# 7

Nested functions and Tuple returns, two new features in C# 7

Does the growing use of C# as a cross-platform language affect the language itself?

Torgersen: Less than I thought it would. Somehow, through all those years of being a Windows language only, except for Mono, which wasn’t a Microsoft effort, somehow we managed to avoid Windows-isms in the language. That’s to Anders’s credit primarily, having the foresight to never make it a Windows language, and never make it a COM language. There are a few things in the .NET Framework, but in the Framework you can build a new library.

There is one thing though. While we never hemmed ourselves into a particular platform, I think we were hemming ourselves a bit into a certain form factor. I’m thinking specifically of dynamic, the last feature where we still worked under the assumption that computers next year would be bigger. Because it was a very heavyweight feature. Almost at the same time, the mobile revolution started, and devices started becoming smaller rather than bigger. The effect of that is that it is not as useful as it might have been in an alternative world where computing power continued to go up. You can’t predict the future right every time.

Does Anders Hejlsberg still work on C#?

Torgersen: He’s changed his role with respect to C#. He is a Technical Fellow, he has ultimate technical oversight of all the languages. He spends his engineering brain cycles exclusively on TypeScript. If you look on GitHub he is one of the top contributors. That’s his big project. So he’s not in a daily work on C#. He’s a reviewer and whenever we’re stuck, usually has a good idea.

The number of people writing pure Windows applications is in decline. What prospect is there of getting C# to grow outside the Microsoft platform?

Torgersen: I think the Microsoft taint, if you will, has certainly meant that it was seen as belonging to a certain subset of the market. We’ve come to a point now where from a technical standpoint that is no longer true, especially when .NET Core comes out The onus is on us to get that message out there.

It was one the challenges when we rolled out TypeScript. Nobody expected Microsoft to do something for the greater good. There was a slew of theories about how this is part of Microsoft’s secret plan to take over this or that, because that’s what people were expecting from us.

Campbell: Something I’m working on more heavily with Roslyn is making sure that not just the language is there but the tools are there as well, wherever you are at. If you are always using vi to write C code, you should be able to use vi to write C# code and have a great experience, that fits in with the feel of that editor.

How far will Microsoft go with .NET Native, the ability to compile to true native code? Will that be available for all platforms?

Campbell: I think that is likely to happen. It is on the roadmap. I don’t know when. The realities of getting software out mean you have to pick the right scope. It’s all part of a larger deployment story and a performance story as well, where if you are building cloud applications, getting the smallest bit of code that runs as efficiently as possible and uses the least amount of cycles is really important. If we want C# and .NET to go there, that needs to happen.

.NET Core introduces new deployment stories around being able to deploy your app as a single entity without requiring something machine-wide to be installed and it’s just that next step of taking it all and making it a single executable as well. That is definitely on the roadmap.

Torgersen: I think it’s great to have the option. It’s a trade-off when you deploy between, I want to deploy in a way that runs on all machines, targeting IL [Intermediate Language] and assemblies, versus I compile specifically to one native platform with some performance benefits, but now it is just for that platform.®

More about


Send us news

Other stories you might like