|
|
|
|
|
by seanx
5499 days ago
|
|
IIUI Anders isn't suggesting that null isn't necessary, but that you should be able to say in code: this type does not allow nulls (or this type does allow nulls). We have this with value types, int or int?, but not with reference types. Adding this in at the start would have removed many chances for bugs. E.g. I frequently need to check if params are null and then throw an exception at run time. If I could declare a param as requiring a value then the error could usually be caught at compile time. |
|
But my point is "how, do you think, people use it in the real world".
It's just like any other programming languages: people tend to abuse it.
At the end of the day, it all depends on your developers.