Re:Multicore OCaml: Feb 2020 update
by hope-striker on Saturday February 29, 2020 @09:12AM
(#22450627)
> The bigger problem is laziness. How is laziness implemented? A value is represented as an unevaluated thunk, a closure to compute the value. When the value is needed, the closure is run and then replaced by the resulting data. This is mutability. And this is something that almost every Haskell program relies on.
Tangent: does GHC ever decide that it's cheaper to just potentially evaluate something twice than to use thunks?
Tangent: does GHC ever decide that it's cheaper to just potentially evaluate something twice than to use thunks?