Re: feature request from r5rs

[email protected]
Newsgroups gmane.comp.java.sisc.devel
Message-ID <[email protected]>
On Wed, Jun 11, 2003 at 09:27:06AM -0400, Narang wrote:
> 1st caveat I agree with but the other two caveats are also true for
> 
> (+ (force (delay (* 3 7)) 13)      ===> 34

Oh right, as for efficiency, if it was supported by the compiler, and 
introduced as a new uexp, it shouldn't affect performance anywhere else.

	Scott

> 
> Matthias Radestock <[email protected]> writes:
> 
> > Narang wrote:
> > > From r5rs: * Some implementations may implement ``implicit forcing,''
> > > where the value of a promise is forced by primitive procedures like
> > > cdr and +:
> > > (+ (delay (* 3 7)) 13)          ===>  34
> > > Can this feature be added to sisc? thoughts.
> > 
> > It wouldn't be hard to add, with three caveats:
> > 
> > * preventing it from slowing down *everything* is difficult,
> > 
> > * synchronization is required in order to implement the correct
> > semantics in the presence of multiple threads,
> > 
> > * care needs to be taken to ensure the correct call/cc semantics is
> > implemented.
> > 
> > R5RS doesn't say anything explictly about the last point. However, it
> > is clear from the examples that capturing a k inside a delayed
> > expression and subsequently invoking it will
> > 
> > * (partially) re-evaluate the delayed expression and re-set the
> > memoized value,
> > 
> > * resume computation at the point where the force (explicit or
> > implicit) occured.
> > 
> > 
> > Matthias.
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> SISC-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sisc-devel
> 

--
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+5zoHr9IW4v3mHtQRAqqTAJwO2Trxny5V9UBwKdPKa5TuMhw33wCaArfg
u7uxcQX2koSnkX0Y1s47YUU=
=+z9e
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.