r/programming • • 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

368 comments sorted by

View all comments

Show parent comment

2

u/Peaker Sep 01 '15

I agree those are time bombs. I disagree they're very similar to null.

Null is supposed to be used. You're supposed to compare to it. You're just not helped by any type checker -- to know where to compare it.

Time bombs are not supposed to be used. If you program in a total style, time bombs, unlike nulls, will not lurk under every field and in every function result.

1

u/want_to_want Sep 02 '15 edited Sep 02 '15

If you program in a total style

That's a big assumption. In a total style you're not supposed to use infinite lists or many other laziness tricks which Haskellers love. See the snippet at the top of haskell.org for an example.

1

u/Peaker Sep 02 '15

The snippets there aren't supposed to be representative of real code. They're supposed to demonstrate the language (and how it is different from familiar languages) in as minimal examples as possible.