r/functionalprogramming • u/metazip • Jun 28 '24
Question Does Lazy Evaluation have a Future?
In Haskell it is used for deforestation to keep the stack low. But after some experience with it, it is simply a problematic concept.
UPDATE: What do you think about a concept with buds?
Buds that change from unbound to bound via a side effect,
which can be checked beforehand with isbound. Wouldn't a concept with buds be much more flexible.
2
Upvotes
View all comments
Show parent comment
3
u/quiteamess Jun 30 '24
First of all, Haskell is a research project that started how far you could get with pure, lazy, functional programming. If you want to explore a new paradigm you have to stick to it.
We are re-hashing a discussion that was going on in the nineties. Hughes argued that laziness gives programmers a “glue” to build modular programs. He concludes that “[..] lazy evaluation is too important to be relegated to second class citizenship”. Haskell is the research tool to test that idea.
When you follow the citations of the paper you see that there are about 1500 citations. For example the paper on QuickCheck has an explicit discussion about lazy evaluation (6.5). And indeed they are raising similar concerns that you have raised. But if termination checking is important for you, maybe Idris or one of the other research languages is a better choice.