Two decades after its creation, C# continues to be one of the most popular and widely used programming languages in the world. Favored by millions for its versatility and easy-to-read syntax, the programming language has quickly become a go-to for web and mobile apps, game development, business applications and more.
While it shares a close heritage with Java – originally being designed as a rival to the programming language developed at Sun Microsystems (now Oracle) in 1996 – C# has evolved largely along its own path since its beginnings in 2001, not least thanks to extensive support from Microsoft.
SEE: The best programming languages to learn in 2020 (TechRepubic)
Much of C#’s popularity lies its tendency to embrace new features quickly. Mads Torgersen, Microsoft program manager and lead designer for C#, says it is this forward-thinking design that has allowed the programming language to accrue such a large userbase over the course of its 20-year history.
“Leaning strongly into innovation has always been one of the things that distinguishes C#,” Torgersen tells TechRepublic.
“I think it strikes a fairly pragmatic balance where the things we do focus on scenarios that real programmers find themselves in. We’re very keen on the innovation being driven by usefulness, not so much beauty. At the same time, we try really hard to keep the language coherent, and having a unified field to it.”
Torgersen has been the lead orchestrator of C#’s design for the past 15 years. Torgersen, who spent four years as an associate professor at Denmark’s Aarhus University before leaving academia for industry in 2005, now leads a team at Microsoft whose roles are to coordinate the future direction of C#.
Unlike Torgersen, most of those on the C# design team are involved in building and implementing the programming language, and tend to be working in adjacent fields at Microsoft. Meanwhile, it’s Torgersen’s job to actually run the C# language design process, and maintain the language’s specification.
“We get together quite frequently, roughly twice a week for two hours, to make the decisions and drive the creative work around how we should do things in the next version of C#,” he explains.
“I’m sort of the orchestrator of that, and one of the people that does a lot of the groundwork around bringing in ideas and working out details for that project.”
A million different voices
While it’s always had its center of gravity at Microsoft, C# is an open-source programming language and as such follows an open-source design process. While this is primarily driven by Microsoft, ideas regularly come down the pipeline from the C# community.
“We do have a GitHub site dedicated to the design of C# and another one that’s dedicated to the implementation,” says Torgersen.
“On the design site, we have a lot of interaction with folks who are not day to day involved [with C#] but who often are C# users, and they contribute ideas for discussion. Some of the features that come into C# come through that channel.”
With ideas coming in from some many angles, then, how does Torgersen and his team filter out what’s important?
“That’s a challenge, because a lot comes in,” he admits. “It’s a big programming language in terms of usage – there are millions of C# developers and so there is quite a lot of input.”
SEE: Top 5 programming languages for systems admins to learn (free PDF) (TechRepublic)
This is where good old-fashioned democracy comes in handy. To aid the process, Torgersen and his fellow C# designers have adopted a championing mechanism, whereby each member of the team will assess the ideas that come in via GitHub and advocate for any they feel worth bringing to the table.
Decisions are not only based on the amount of interest each idea receives, but whether it fits the language’s planned evolutionary path and the uptake of similar ideas in other languages, Torgersen explains.
“It’s a very debate-oriented approach,” he says.
“Having a design team like that is really the key to managing this kind of process and making the right decisions. You need to have lots of perspectives in the room at all the time, but also a process for them not just talking in all directions.
“We circle around a lot to make sure we’ve covered all the bases, but we also have a way to reach agreement and say, ‘OK – this is what we’re doing’. It’s a balance of having a lot of input and doing a lot of things, but having a strong stewardship of how it all comes together, so that what comes out feels like it’s been designed holistically.”
“That was a big turning point, because it helped us with addressing one of these big changes in the developer landscape, which was the turn to cloud and mobile,” says Torgersen.
“All of a sudden, there was much more need for programs to communicate across different devices, whether it was up to a server in the cloud, or whether it was between mobile devices and servers, and so on. We solved that very successfully and the industry picked up since then on our approach to it. That’s something I’m very proud of.”
Of course, a lot has happened in the 15 years since Torgersen took over the helm of C# from creator, Anders Hejlsberg. More recently, the rise of no-code, low-code platforms – particularly amid the COVID-19 pandemic – has started to level the playing field by allowing people with little to no coding ability to build functional apps.
SEE: Linux commands for user management (TechRepublic Premium)
Given the current global shortage of developers, these platforms are straightforward enough to allow even non-programmers to develop fully functional business workflow applications that can be integrated into businesses’ wider IT infrastructure.
“I know a lot of programmers kind of view that with a bit of scorn, and we also realize that it can only take you so far, but at the same time I really appreciate that it gets more people into being creative with computers,” says Torgersen.
“It makes it less of a sort of esoteric or secretive or cabal-like thing, the whole coding thing becomes less mysterious, and more accessible.”
Torgersen is also optimistic that low-code, no-code platforms and traditional programming can coexist peacefully, though he acknowledges that there’s a challenge “as to what happens on the boundary”.
“That has always been the challenge of low-code approaches, even before we called them that, which is that the low-code, no-code setup just inherently introduces – at least, with the technologies we have today – some limitations on what you can do,” he says.
“That has always been an uneasy kind of terrain in the past, to the point where I think it has contributed to the failure of some no-code approaches that didn’t have a growth story for when things needed to get a little smarter. That’s a challenge that we need to keep trying to address.”
C# 9.0 and beyond
Like all modern programming languages, C# continues to evolve. With C# 9.0 on course to arrive in November, the next update will focus on supporting “terse and immutable” (i.e. unchangeable) representation of data shapes.
“C# 9.0 is trying to take some next steps for C# in making it easier to deal with data that comes over the wire, and to express the right semantics for data, if you will, that comes out of what we call an object-oriented paradigm originally,” says Torgersen.
C# 9.0 takes the next step in that direction with a feature called Records, says Torgersen. These are a reference type that allow a whole object to be immutable and instead make it act like a value.
“We’ve found ourselves, for a long time now, borrowing ideas from functional programming to supplement the object-oriented programming in a way that really helps with, for instance, cloud-oriented programming, and helps with data manipulation,” Torgersen explains.
“Records is a key feature of C# 9.0 that will help with that.”
Beyond C# 9.0 is where things get more theoretical, though. Torgersen insists that there’s no concrete ‘endgame’ for the programming language – or at least, not until it finally reaches some as-yet unknown expiration date.
“Which will happen one day!” he adds. “I think some interesting things, that it’s time to look at again, have to do with software composition – making it easier to combine different pieces of software after the fact.
“There’s a degree of adaptation that most programming languages are good at, but aren’t good enough, and I want to lead a charge to have more powerful features for adaptation so that you can bring existing software components better into play with each other.”
Can we expect this in C# 10? “That’s sort of a long-term project that we’re also working on, even as we’re doing more short-term useful features,” says Torgersen.
“This would be universal. This would help anyone who does software development, but in particular when you’re bringing several frameworks together and trying to make them cooperate.”