Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Lazy Programming

Up
vote
Down

Lazy programming is a general concept of delaying the processing of a function or request until the results are needed. Thinking in terms of lazy programming can help you rid your code of unneeded computation and restructure programs to be more problem-oriented.
In Scheme, for example, lazy programming is explicitly supported through two special constructs. Scheme's delay special form takes a block of code and, rather than executing it, stores the code and its parameters as a promise. If you force the promise to produce a value, it will then run the code. The promise then saves the result, so that future requests for the value will be returned instantly without having to execute the code again.
 read more | mail this link | score:4110 | -Ida Momtaheni, December 12, 2007
More Programming articles...

Buy Fine Art on Canvas Online

coding headlines

I wrote my first programming e-book: Awk One-Liners Explained

Expect Script Examples

13 Regex Features

Fix concurrency bugs with GPars

Continuous integration with Buildbot

Create Flex 4 and Java web apps

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin