.NET Zone is brought to you in partnership with:

I am a Software Engineer working with the latest in .NET focusing on Web Development. With a burning heart for programming, I blog and author a book about C#. Filip is a DZone MVB and is not an employee of DZone and has posted 53 posts at DZone. You can read more from them at their website. View Full User Profile

What Language Features Do You Miss In C#?

  • submit to reddit

Every now and then I hear people shout “I really wish C# would have X and Y, it would make my life so much easier”. This makes me think about what features I’d like to see supported in the language. There are multiple factors to take into consideration when thinking about what should be a language feature and not.

If C# would be completely open source and driven by the community we would probably see a lot of pull-requests for new language features. But I’d imagine that many of these features were implemented by someone that felt like the problem solved some in their opinion generic case. This might not actually be the case though. When adding a new language feature, to any language, you need to take into consideration that a big part of the community should benefit from it.

A good example is how language features for asynchronous programming were added in .NET 4.5. But asynchronous programming was possible before this. “All” it really does is adding a nice state-machine and does all the heavy lifting for us. This is something that developers doing asynchronous programming would have to implement over and over again thus making it a perfect candidate to become a language feature.

Mindscape has an article about what F# features every C# developer should lust after which brings up some interesting language features such as:

  • Pattern matching
  • Immutability
  • Object expressions

What language features do you miss in C# and why? Keep in mind that a language feature should target a broad audience! Maybe you’re happy with what is in the language right now?

C# Smorgasbord ebook limited-time offer now only €4.99!

The post What language features do you miss in C#? appeared first on Filip Ekberg's blog.

Published at DZone with permission of Filip Ekberg, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)