3 ms·
I think it's too late for non null ref types. But pattern matching, traits and built in code contract would be awesome !
by vans 12y ago
I think it's too late for non null ref types. But pattern matching, traits and built in code contract would be awesome !
- ColinDabritz 12y agoNon-nullable reference types have been called an impossible problem, but so was 'Await in catch and finally blocks' which shipped in C# 6. From http://blogs.msdn.com/b/csharpfaq/archive/2014/11/20/new-features-in-c-6.aspx http://blogs.msdn.com/b/csharpfaq/archive/2014/11/20/new-fea... "Await in catch and finally blocks has been disallowed until now. We’d somehow convinced ourselves that it wasn’t possible to implement, but now we’ve figured it out, so apparently it wasn’t impossible after all." I'm hoping this is one of those 'Clark's first law' situations: http://en.wikipedia.org/wiki/Clarke's_three_laws http://en.wikipedia.org/wiki/Clarke's_three_laws 'When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.' They've got quite a lot of smart folks working on C#, and it's heartening to me to see them taking another look at non-nullable reference types.
- pbz 12y agoIt would be such an important feature that I'd be willing to tolerate breaking changes -- the language designers may not however.