This post originated from an RSS feed registered with .NET Buzz
by Eric Gunnerson.
Original Post: Be a language designer...
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
I started writing a normal blog post - well, as normal as any blog post of mine ever is - and then I decided to let you do the hard work. So here's the situation.
You're part of the C# language design team thinking about the next version of C# (ie the version after VS 2005). You get the following email:
When I'm writing code, I often come across a situation where my code throws an exception because another component called with a null parameter. I'd like a way to prevent that from happening.
What are the pros and cons of such a feature? What are the ramifications of adding it to the language? What would have to change? What is your recommendation? Exactly what would such a feature look like?