Laziness is a critical but often maligned aspect of Haskell, and as this video argues, it is frequently misunderstood. In this video, Alexis explains how eve…

  • zygo_histo_morpheus@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Looking forward to seeing the rest of the series. I agree with her perspective that laziness is about giving the compiler greater freedom to optimize things in certain ways, but the problem is that it sometimes feels like a leaky abstraction. Sometimes you do end up with space leaks or similar due to lazyness and in that case you really have to grock the compiler to be able to fix it. As she points out with the haskell example at the end, the compiler doesn’t always do things in the most lazy way possible, so being able to intuit how lazyness might affect your program can be hard and measuring it can be a pain.