[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What are the arguments in favor of delay/force in eval.c?

From: Rob Browning
Subject: What are the arguments in favor of delay/force in eval.c?
Date: Tue, 06 Dec 2005 13:14:12 -0800
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Does anyone know what the arguments are, if any, for implementing
delay and force directly in eval.c rather than more generically, at
the Scheme level, perhaps in boot-9.scm via define-record, lambda,

  (define-record promise

  (define-syntax (delay exp) ... (make-promise ... (lambda () (exp) ...) ...))

  (define-syntax (force promise) ... ((promise-get-thunk promise)) ...)

Is the primary argument efficiency?

I ask because I was thinking about SRFI-45 (perhaps in prelude to
SRFI-40) and was trying to determine what Guile specific constraints
might apply to an implementation.

   SRFI-45: Primitives for Expressing Iterative Lazy Algorithms
   SRFI-40: A Library of Streams

If these were added to Guile, then we might want the SRFI-40 delay and
force to just replace our existing implementations.

Rob Browning
rlb and; previously
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

reply via email to

[Prev in Thread] Current Thread [Next in Thread]