Re:Poll: What's Your Favorite Programming Language?
by nikolaplejic on Saturday March 24, 2012 @04:12AM
(#3748843)
They don't really work at the type system level, but Code Contracts (http://msdn.microsoft.com/en-us/devlabs/dd491992), though quite verbose, may be used to achieve that to a certain degree. The integration with Visual Studio is decent and the documentation is great, but they are designed to provide a whole design-by-contract framework which may be an overkill.
Re:Poll: What's Your Favorite Programming Language?
by hackinthebochs on Friday March 23, 2012 @04:31PM
(#3747116)
That's a good one, I'll keep that in mind. (I'm not just cribbing, I ran into a real world situation that just screamed non-nullable objects).
Re:Poll: What's Your Favorite Programming Language?
by pbz on Saturday March 24, 2012 @12:26PM
(#3749762)
I remember Anders saying that that was one of his regrets for not implementing this from the beginning. According to him adding this now would break quite a few things, but he hasn't yet given up on the idea.
Even better I would have an option type so that you never need to use null, ever.