How to avoid correctness space leaks on a lazy setting in Haskell
epicandmonicisnotiso.blogspot.com
epicandmonicisnotiso.blogspot.com
I just want to add that this post makes more sense if it is read as a continuation of the argument made on here <https://epicandmonicisnotiso.blogspot.com/2023/03/an-apologi...> which had comments on HN on here <https://news.ycombinator.com/item?id=35305546>
BTW: I am open for hiring :^)
> these defensive coding patterns enable me to use lazy evaluation to have more compositional power, it is a trade-off.
IMO Haskell is more of a dream project of having a highly optimizable and flexible complier. Its fun to write, great when it works (well), but it's not the workhorse of C and Python.
Anecdata, but I've seen more space leaks in non-Haskell languages than Haskell in production despite having more production years of experience in Haskell over the last decade.
Space leaks really are not a big issue.
You have to understand runtime of any language in order to write memory-efficient code in it. Lazy runtimes are predictable once you know how they work.