myAnd False (error "boom") would crash.
In Haskell it returns False because the second argument is never evaluated.
foldl', seq,
and BangPatterns are the standard tools for forcing evaluation where needed.
| Property | Lazy (Haskell default) | Strict (Rust, Python, F# default) |
|---|---|---|
| Infinite structures | Natural | Require explicit iterators |
| Space usage | Unpredictable (thunk chains) | Predictable |
| Short-circuit as library | Yes | No (requires language support) |
| Debugging | Harder (evaluation order unclear) | Easier |
| Performance | Can avoid unneeded work | No thunk overhead |
foldl', seq,
! fields, WHNF forcing). F# is strict but provides
Seq (lazy sequences) as a library type.