[racket] discarding initialization with delay + reset

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Oct 18 07:52:23 EDT 2010

If you use drracket to code, use check syntax on your expression, right-click on delay or force, and request to jump to the definition. This will trigger an error message --ignore it! Look for force/ and force and delay to understand how things are handled in this world. 

Racket truly is an open source system -- everything is available at your finger tips, including the definitions of what others would consider systems code. 

And there is no better way to understand all this than to read the source code

-- Matthias



On Oct 18, 2010, at 6:52 AM, Keiko Nakata wrote:

> Hello,
> 
> Can I regard this behavior as intended semantics?
> 
> (let* ([x0 (delay (control k I))]
>       [x1 (delay (force x0))])
>  (reset (force x1)) (force x1) 0)
> 
> raises an error 'force: reentrant promise x1'.
> 
> I speculate that an operation of 'update x1' is captured therefore discarded.
> But how this is implemented?  
> Do you have a reference implementation or something that I can consult?
> 
> Sorry for my making-no-sense examples.
> --- I get inspiration from Racket to engineer my language :)
> 
> 
> Keiko
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users



Posted on the users mailing list.