[plt-scheme] mutating module variables

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Apr 29 20:49:05 EDT 2003

At 29 Apr 2003 18:34:33 -0400, Daniel Silva wrote:
> Is this good behavior?

It's the intended behavior, at least...

> In most operating systems you can load libraries with copy-on-write so
> you don't get a horrible performance penalty of loading list.ss 500000
> times when starting DrScheme, but you do get a fresh copy in case you
> want to change it.  Would it be a bad thing for MzScheme to have that
> sort of copy-on-write for its dynamically-linked libraries (modules) as
> well?

If your application consists of libraries A, B, and C, and both B and C
use A, then probably they intend to share the state in A. That's the
`module' analogy.

If you start another application that uses A, then you don't expect to
share the state of A with B and C of the original application. So, the
question is what corresponds to an "application" in MzScheme. For
modules instances, it's a namespace.

(Currently, module code is not shared by different namespaces. That
might be a useful optimization one day.)

Matthew



Posted on the users mailing list.