3 ms·
I read the article as saying almost exactly that: thunks are sort of like closures, but not entirely. I have the advantage of having a good understanding of bo
by kscaldef 17y ago
I read the article as saying almost exactly that: thunks are sort of like closures, but not entirely. I have the advantage of having a good understanding of both thunks and closures already, but I don't think most reasonable readers would think he's drawing an exact equivalence. Rather he's pointing out a similar concept (code that is run sometime later) that readers may have encountered elsewhere.
- Xichekolas 17y agoBut he does draw direct equivalence: "Local color so you can sound like you know what you’re talking about: in Haskell-land, a closure is called a “thunk”." Which just isn't true. A closure is called a closure and a thunk is called a thunk (as it is in Scheme and any number of other languages; there is nothing special about Haskell). For most of that article he should just replace the word 'closure' with 'thunk' and the issue would disappear.