Penguin
Diff: LazyEvaluation
EditPageHistoryDiffInfoLikePages

Differences between current version and revision by previous author of LazyEvaluation.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 5 Last edited on Sunday, March 7, 2004 9:34:34 am by AristotlePagaltzis
Older page: version 2 Last edited on Sunday, February 16, 2003 5:31:15 pm by GlynWebster Revert
@@ -1,8 +1,5 @@
+LazyEvaluation is an approach that a ProgrammingLanguage can take to evaluating expressions. With LazyEvaluation a function is passed whole expressions as arguments, and does not evaluate them until it needs their values.  
  
-''Lazy evaluation'' is an approach that a ProgrammingLanguage can take to evaluating expressions. With '' lazy evaluation'' a function is passed whole expressions as arguments, and does not evaluate them until it needs their values . (I won 't go into __why__ you'd want that, but there are good reasons .)  
+You could call [C] 's __&&__ and __||__ operators lazy operators: they do not always evaluate their second arguments . But this is a built-in feature of [C] and there 's no way to specify user defined operators that work that way. In [Haskell] f.ex , which is the most widely used lazy functional programming language, you can
  
-[Haskell] is the most widely used lazy FunctionalLanguage.  
-  
-You could call [C]'s __&&__ and __||__ operators lazy operators. They do not always evaluate their second arguments. This is is built-in feature of C though, you cannot define your own operators that work that way. In Haskell you can.  
-  
- I/O is problematic in lazy languages. Programmers needs to provide some way to keep I/O operations in the correct sequence . Lazy languages don't assume a linear flow of time: you have to model that explicitly in your programs! Haskell uses a data structure called the [Monad] to control sequential operations
+I/O is problematic in lazy languages. Lazy languages don't assume a linear flow of time: you have to model that explicitly in your programs! Programmers need to provide some way to keep I/O operations in the correct sequence; in [ Haskell] this is done using a data structure called the "monad"