Modules vs. ADTs in ML
ML abstract data types implicitly define a single type
- With associated constructors, observers and mutators
Modules can define 0, 1 or many types in the same module with associated operations over several types
- Multiple types can share private data and operations
Functors are similar to parameterized ADTs
Modules are more general, but clumsier for the common case