bearophile wrote:
I don't see that non-null is such a special case that it would benefit from a
special case syntax.
Well, nonnull are a special cases because:
- There is a good enough way to solve this problem. This is not true in the
general case.
- null exceptions are very common bugs, among the most common ones in Java and
C#.
Any type having an unexpected value in it is a very common bug. They often go
unnoticed, though, because they don't generate a seg fault. The bug is still
there, though.
So no, I don't agree it is a special case.