This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 55: Lazy evaluation

2011-01-24 06:38:39
WG1 - Core
alexshinn
major
cowan
wontfix
source
closed
2010-05-02 23:46:34
defect

R5RS provides a simple mechanism for easy cases of lazy evaluation. It does not support generalized lazy evaluation, because all built-in procedures are eager whether they 'need' to be or not. The relevant identifiers are delay and force; they are not present in IEEE Scheme. SRFI 45 argues that this pair is insufficient for expressing common lazy algorithms in a way that preserves tail recursion, and adds lazy (equivalent to (delay (force ...)), but acting atomically) and eager. The semantics of delay and force remain downward compatible.

I favor the SRFI 45 argument; see the SRFI itself for details.

I think the four identifiers should be in an optional module.

Editorial note: the sample implementation given in R4RS and R5RS does not conform to the specification (it doesn't memoize) and should be removed or replaced.

componentWG2 - Base LibraryWG1 - Core
ownercowanalexshinn

Regarding the sample implementation from R5RS, it does memoize via make-promise so there's no need to change it.

resolutionwontfix
statusnewclosed

WG1 voted to reject SRFI 55.