title: Nullable Reference Types with C# 8
body: <p>Null reference exceptions are one of the top sources of program failures. Tony Hoare called it his billion dollar mistake. So I'm particularly looking forward to C# 8 and the new <em>nullable reference types</em> feature. I think I've got a pretty good grasp of the feature and what it's going to mean for my code. There is one aspect I'm struggling the get my head around though and that's how <code>default</code> will behave.</p>
  
  <p>Currently in C# <code>default(string)</code> will return null. But when C# 8 comes along then doing something like <code>string x = default(string);</code> should surely give a compiler warning straight off the bat. Seems like this is a bit of a paradox. I'm also wondering if <code>default(string?)</code> will be possible and what would it even return. I guess it would have to be null which just adds to my confusion.</p>
  
  <p>I don't think there has been a preview release of this feature yet, but I was wondering if anyone knows yet how this will be handled.</p>