Q&A

Q&A with Jason Bock: What's New in C# 10

C# is inescapable. Microsoft's venerable flagship coding language consistently ranks high in popularity, recently adding half-a-million users, and is one of the top languages for desktop and game developers. With Version 10 well on its way (it'll likely be released in November alongside .NET 6), now is a good time for developers to brush up on their C# skills -- and that means learning about the most useful new and emerging features.

.NET expert and Microsoft MVP Jason Bock is an information goldmine when it comes to C#. Bock will lead a session in November's Live! 360 conference, taking place in Orlando, Fla., called "What's New in C# 10," where he'll go over the best features in the coming C# release, how best to use them, and how developers can participate in C#'s future evolution. We caught up with Bock recently and asked him his thoughts on how C# has grown over the years, and where he sees it going.

VisualStudioMagazine: What's the roadmap for C#?
Bock: When C# and .NET weren't open source, it wasn't easy to know where they were going. Now, all the design work is being done in the open. You can see what features are being proposed for a future version of C#. You can find a ton of information on C# itself.

I think one aspect to watch is C#'s evolution over time and weighing the ability to add new features with potentially breaking the language to support a desirable concept. It's not an easy problem to solve, and I'm interested to see how the C# team tackles this over time.

Broadly speaking, how has .NET's evolution over the years affected C#?
I think we're now at point where the cadence of .NET and C# align very well. We started with the .NET Framework, and then .NET Core became a thing. It started to become harder to build packages that could be used by both runtimes, so .NET Standard became a thing. Now that we have "one" .NET, I believe that it's easier to upgrade and stay current with the evolution of the language and the runtime.

"One aspect to watch is C#'s evolution over time and weighing the ability to add new features with potentially breaking the language to support a desirable concept. It's not an easy problem to solve."

Jason Bock, Microsoft MVP

What's a C# feature that you wish Microsoft would come out with, but it just hasn't materialized?
Generic attributes. This is a capability that the CLR has had for a long time, but it's never been surfaced in C#. You can define generic attributes in the intermediate language of .NET -- IL -- and consume them in C#, but you can't define them in C# directly. There are cases where I think this feature would be useful, and I'm hoping it makes it into C# at some point.

What C# 10 capability are you most excited about? Is there one that you can absolutely do without?
Static abstract members in interfaces is a preview feature, so it technically doesn't count, but developers will be able to experiment with it. I think this feature brings another level of expressivity and design capabilities.

Inside the Session

What: What's New in C# 10

When: Nov. 16, 9:15 a.m. - 10:30 a.m.

Who: Jason Bock, Developer Advocate, Rocket Mortgage

Why: "C# is an open-source, mature object oriented language, used by millions of .NET developers, yet its evolution is still underway."

Find out more about Live! 360, taking place Nov. 15-19 in Orlando, Fla.

The caller argument expression feature isn't getting as much visibility as global using directives and lambda improvements, but it'll make scenarios like logging easier to determine what was done at the call site. I have the feeling this may be used in ways that go beyond capturing the expression as a string.

How would you rate C# compared to other programming languages now?
Rating and comparing languages are a hard endeavor. They all have their strengths and weaknesses. That said, I think C# is a fine language for a couple of reasons. It's been around for over 20 years, so it has a substantial amount of usage behind it. It's cross-platform, so developers can use it on different operating systems for a wide variety of user scenarios. Finally, it's still actively being maintained by Microsoft, and will be for the foreseeable future.

Favorite version of C#. Go!
This is a hard question to answer. I feel like each version has features that are useful! That said, I'd go with Version 2, because it added generics. I can't imagine what it would be like to be coding in C# without this feature. To be fair, there are good languages that do not have the notion of generics, but it's so pervasive in C#. It's readily apparent that generics is a fundamental aspect of C#.

About the Author

Gladys Rama (@GladysRama3) is the editorial director of Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube