(perhaps this has already been discussed, but I failed to find any answers)
Lazy evaluation is a common occurrence in Haskell. It allows for thunks to only be evaluated when necessary, and not when e.g. passed as parameter. This allows for structures like infinite lists, trees, or parsers (which afaik uses a custom lazyness function). And it could save on computations when only the WHNF of a function result is required.
I could see how it could be confusing to programmers from a non Haskell background, but it would mostly be a behind the scenes optimization, and in the most intrusive case could prevent things like stack overflows.
I think in practice these benefits of haskell... don't work out. Richard can say more about NRI's experience with haskell in production
for most programs, I don't think lazy evaluation has benefits, and it has many pitfalls
not least of which for our case: you cannot do reference counting in a language with lazy evaluation
and consider, after haskell and some others in the mid 90s, lazy evaluation just hasn't been picked up by subsequent (research) languages: Idris, Elm, Lean, Koka are all explicitly strict, even though their authors are very familiar with haskell and lazy evaluation
all too familiar, I'd say
yeah I think that short version is that Miranda and especially Haskell explored the space and revealed that it didn't live up to expectations in practice.
e.g. SPJ has said (maybe it was in "Escape from the Ivory Tower?") that:
The researchers who formed the original Haskell Committee to design the language were specifically fired up about researching laziness (and now
basically all of them have pivoted to type theory)
The best thing about laziness turned out to be that it was a forcing function for doing absolutely everything with pure functions (instead of the usual "prefer pure functions when you can, but side effects are fine too when necessary"), and this revealed how surprisingly awesome language-level referential transparency is
Good to know, one less thing to remember.
It's funny how Roc does away with concepts (like laziness) that in my mind are an intrinsic part of FP. (and rightfully so)
iirc, Idris has opt-in lazy semantics available, but is eagerly evaluated by default?
There were certainly notorious cases in Haskell in which the overhead of thunks dominated processing time.
It seems like, with more modern compiler technology, if anyone were to try making a lazy language again, much of it should be optimized into eager evaluation anyways, using something like flow analysis and cost estimation.
Last updated: Jun 16 2026 at 16:19 UTC