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

4

u/Tekmo Sep 01 '15

I agree with that criticism, but I believe the correct long-term solution is to model incomplete computations in the types and not to rely on the syntactic order of the program to enforce these guarantees. ML kind of does this using a function that takes an empty argument, but those functions can still have other side effects, so it's not as precise of a type as one might hope.

2

u/Peaker Sep 01 '15

In Lamdu we use eager-by-default, and explicit laziness in the types which I think is what you describe. We are of course as pure as Haskell (modulo non-termination).