Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
anonnona
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
anonnona
14y ago
I don't think you understand. If you don't allow null by default in your type system then you don't have to check for it when you don't need it. Dealing with user input is a separate issue, yes you need to validate it. The problem with ever
2.
▲
by
anonnona
14y ago
In that world you have bugs lying in wait inside the code ready to rear their head at inopportune times, better to not allow their existence at all. Also in terms of difficulty of fixing bugs its a lot easier to fix bugs at compile time on
3.
▲
by
anonnona
14y ago
I think you are missing the point. The problem is that for the most part needing to check whether an object is null/"valid" should be an exceptional case, not a common one. Most object variables do not need to have the optional/null state.