Penguin
Note: You are viewing an old revision of this page. View the current version.

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.)

Haskell is the most widely used lazy FunctionalProgramming? language.

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.