Talk:Non-strict semantics

From HaskellWiki
Revision as of 18:02, 28 November 2011 by Dlthomas (talk | contribs) (New page: While operators in Haskell are functions, the choice of an operator for the example is a poor one. One can, in fact, write 1 || infinite_loop() in C and have it terminate successfully, ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

While operators in Haskell are functions, the choice of an operator for the example is a poor one. One can, in fact, write

1 || infinite_loop()

in C and have it terminate successfully, precisely because || has non-strict ("short-circuited") semantics in C.