3 ms·
For some technical discussion of the order of evaluation of arguments: https://en.wikipedia.org/wiki/Evaluation_strategy#Non-strict_evaluation https://en.wikipe
by theoh 9y ago
For some technical discussion of the order of evaluation of arguments: https://en.wikipedia.org/wiki/Evaluation_strategy#Non-strict_evaluation https://en.wikipedia.org/wiki/Evaluation_strategy#Non-strict... (Short-circuiting is specifically mentioned as having relevance)
Note that even in a language which is generally strict, laziness can be provided selectively for individual values, and vice versa. Haskell's laziness has proven to be a cause of troublesome performance problems, sometimes needing to be solved by "strictness annotations"; the newer language Idris is strict, but offers laziness as a type.
http://docs.idris-lang.org/en/latest/faq/faq.html#how-can-i-make-lazy-control-structures http://docs.idris-lang.org/en/latest/faq/faq.html#how-can-i-...
EDIT: phamilton beat me to it, maybe the links are still useful.
- sampo 9y agoScala also has lazy values and arguments as an option.