4 ms·
As it turns out, in practice, you usually want your data structures to be as strict as possible, but your control flow to be as lazy as possible. Further, some
by lomnakkus 12y ago
As it turns out, in practice, you usually want your data structures to be as strict as possible, but your control flow to be as lazy as possible. Further, some code just isn't well-suited to laziness -- so much so that there's work afoot to have a "strict-by-default" LANGUAGE pragma added in GHC 7.10.x[1].
[1] https://ghc.haskell.org/trac/ghc/wiki/StrictPragma https://ghc.haskell.org/trac/ghc/wiki/StrictPragma
- tome 12y ago> you usually want your data structures to be as strict as possible, but your control flow to be as lazy as possible That's a very nice slogan. I'll have to remember that. It certainly covers the case of generally wanting your record fields to be strict and lists to be lazy when used for control flow.
- lomnakkus 12y ago> That's a very nice slogan. Yeah, I borrowed it from some Haskell luminary. My search-fu failed me so I didn't source it as I should have. :)