<br><br>On Sunday, December 18, 2011, Niitsuma Hirotaka <<a href="mailto:hirotaka.niitsuma@gmail.com" target="_blank">hirotaka.niitsuma@gmail.com</a>> wrote:<br>> How about this?<br>> <a href="http://d.hatena.ne.jp/niitsuma/20081113/1324207362" target="_blank">http://d.hatena.ne.jp/niitsuma/20081113/1324207362</a><br>
> I add some comment<br>><br><br>Ok, thanks for posting that code.<div><br></div><div>Do you expect modules to be re-invoked on every require? I am trying to understand your concern about "valid behavior".</div>
<div><br></div><div><br></div><div>The model I have with regards to modules is this: modules can be "required" from many different modules, but they are "invoked" just once.</div><div><br></div><div><br>
</div><div>So I if I have files A.rkt, B.rkt, and C.rkt, which all look like this:</div><div><br></div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>;; a.rkt</div></div><div>
#lang racket</div>
<div>(printf "hi, this is A\n")</div><div><br></div><div><br></div><div>;; b.rkt</div><div>#lang racket</div><div>(require "a.rkt")</div><div>(printf "hi, this is B\n")</div><div><br></div><div>
<br></div><div>;; c.rkt</div><div>#lang racket</div><div>(require "a.rkt")</div><div>(require "b.rkt")</div><div>(printf "hi, this is C\n")</div><div><br></div><div><br></div><div>Then I expect to see the following output when I run c.rkt:</div>
<div><br></div><div> hi, this is A</div><div> hi, this is B</div><div> hi, this is C</div><div><br></div><div>Does my expectation surprise you, or does this match what you'd expect as well?</div>