Comment on Tackling the Awkward Squad: Interaction with the world in Haskell (2010) [pdf]parentComments−tome11yAIUI Oleg's complaint is more about the compiler removing redexes or moving them about, rather than not duplicating them.−ky311yRedexes are elided for 2 reasons:1. Redundant calculation: the result of the redex isn't used. Get rid of it.2. The same redex occurs elsewhere. Reuse the result of that instead. Stay DRY.Oleg has no problems with 1. Oleg has a beef with 2 because in HPC, the time-space tradeoff runs counter to ordinary intuition.
Comments
AIUI Oleg's complaint is more about the compiler removing redexes or moving them about, rather than not duplicating them.
Redexes are elided for 2 reasons:
1. Redundant calculation: the result of the redex isn't used. Get rid of it.
2. The same redex occurs elsewhere. Reuse the result of that instead. Stay DRY.
Oleg has no problems with 1. Oleg has a beef with 2 because in HPC, the time-space tradeoff runs counter to ordinary intuition.