4 ms·
Unfortunately, non-strictness is the biggest hindrance to understanding operational semantics of Haskell. To my knowledge, people using Haskell in serious produ
by DannoHung 13y ago
Unfortunately, non-strictness is the biggest hindrance to understanding operational semantics of Haskell. To my knowledge, people using Haskell in serious production use strictness annotations like there's no tomorrow.
- enigmo 13y agoI did a simple survey of our codebase... as I think we meet your requirements for serious production Haskell. Here's the terribly inaccurate and probably misleading results: Raw line count: destroyer:alphaHeavy$ find . -name "*.hs" | xargs wc -l | tail -1 132272 total Things that look like bang patterns or strict fields: destroyer:alphaHeavy$ grep "\!" -rI . --include "*.hs" | egrep -v "\\$\!|\.\!|\!\?|\!\!" | wc -l 1344 Strict returns: destroyer:alphaHeavy$ grep "\\$\!" -rI . --include "*.hs" | wc -l 762 Unboxed fields: destroyer:alphaHeavy$ grep UNPACK -rI . --include "*.hs" | wc -l 298
- Peaker 13y agoStrict fields in records are probably a better default than lazy fields. So you indeed see lots of strictness annotations in data structures. It also helps with unpacking/unboxing. However, strictness annotations in functions is a relatively rare thing.