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
7
u/faiface Jun 28 '24
What you’re describing now is functional purity. Pure functional programming certainly has a future. Side-effects and checking references for identity has its own host of problems.
Laziness everywhere forces functional purity, yes. But a pure functional language doesn’t have to be lazy. I think it’s very reasonable to have a pure language to avoid problems with side-effects, but not lazy to avoid problems with lazy evaluation everywhere.