[PRL] Racket module question

Ryan Culpepper ryanc at ccs.neu.edu
Wed Jun 29 18:10:07 EDT 2011


On 06/29/2011 04:03 PM, Mitchell Wand wrote:
> I've got two different modules (call them A and B) that cooperate by
> manipulating a shared store.  The API for the store is provided by a
> third module C.
>
> I'm guessing that simply requiring C in both A and  B isn't going to
> work, because A and B would be working with different instances of the
> store.

No, that should work fine. There will be only one instance of C, and 
both A and B will refer to it.

(The run-time instance of C is different from the partial instance 
created for the compilation of A, which is different from the partial 
instance created for the compilation of B. Perhaps that's what you were 
thinking of.)

Ryan



More information about the PRL mailing list