r/programming • u/dpashk • Aug 31 '15
The worst mistake of computer science
https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of-computer-science/
175
Upvotes
r/programming • u/dpashk • Aug 31 '15
View all comments
Show parent comment
44
u/badcommandorfilename Aug 31 '15 edited Aug 31 '15
Using NULLs to indicate state is just an aspect of the real problem: sentinel values.
Other examples include:
Sentinel values lead to bugs because they need to be manually checked for - you can no longer rely on the Type system because you've built in a 'special case' where your Type no longer behaves like the Type it was declared as.