[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modules and Extensions
Quoting "AnderMan":
> Any information around on how to create and use modules with extensions?
The current _Inside MzScheme_ contains that information in the
"Namespaces and Modules" chapter. (Download and read it via Help Desk,
or see http://www.cs.utah.edu/~mflatt/tmp/insidemz.pdf.)
> I was also wondering about the relationship between modules and
> units, are units replacing modules or are they to be used together. I
> noticed that the mzlib modules use units.
In general, they are to be used together. Modules can replace units
where units are used merely for namespace control, but `unit' still has
its own place:
* Implementing parameterized components: The `unit' form separates
interface from implementation, unlike `module'. For example, the web
browser is still a unit, so that its base GUI classes and ".plt"
handler can be parameterized.
* Encasulating a program that has "global" state: A unitized program
can be instantiated multiple times. For example, the compiler part
of mzc is still a unit so that it can be run easily by other tools.
Matthew