Oh I say, that’s a bit strong. deepseq
is a tool with uses, and while I agree that in that specific problem, the strict vector was ultimately the right solution, in a more complex scenario in which either you want some laziness sometimes in your data structures or you don’t yet know which parts of your program are eating all of your memory with thunks and refactoring everything to be strict would be time-consuming, deepseq
is an important tool to have at your disposal, even if just to try force
-ing different things until you figure out which things to refactor. (But sometimes invalid laziness has to be representable; Haskell’s type system is very good at letting you express invariants through types but no type system is perfect at this.)
Certainly when you’re attempting to squeeze your thunks out by forcing everything through a show
, as OP was, force
is something you ought to be told about.