Thank you for this explanation.

I consider myself largely an outsider looking in on module systems, but
I often hear SML and OCaml programmers complaining, wondering when
Haskell is going to “get a real module system”. I’d like to do right
thing in Hackett if I can, but I don’t really know what the right thing
is, since I have written precious little ML, and what I have written is
certainly not enough to get a feel for how modules affect large program
construction. It’s unfortunately difficult (perhaps impossible?) to get
an understanding of the usefulness of an abstraction without using it
oneself, so maybe I ought to just sit down and write some ML programs.


> On Jan 21, 2018, at 1:26 PM, Matthias Felleisen
> <> wrote:
> Units were the wrong approach to everyday modularity.They were, and
> they are, the correct solution to design problems such as those
> explained in our original paper on the idea.
> Units suffer from a large notational overhead for everyday use. The
> second edition, due to Owens and Flatt, does a bit better with the
> introduction of 'linking inference’ but it was too little too ate. The
> other disadvantage of units concerns syntactic abstraction. You really
> want to parameterize modules over their implementation language.
> Shriram generalized units to unit/lang in his dissertation, but this
> proved too difficult to implement. Matthew proposed to make modules
> first-order, as opposed to first-class values, and this worked out
> well. I still use units on rare occasions, for example to mimic
> complex testing contexts and to deploy the same module-level
> abstraction _twice_ in the same program. These situations are rare,
> however.
> Historical note. ML programmers got it similarly wrong when they
> pushed for “fully functorized” style. Once their compilation manager
> came online, they abandoned this style too and simply allowed the
> linker to connect structs as specified. I happened to be with these
> MLers for a year, which inspired me for the unit-like abstraction when
> we launched Racket/PLT Scheme. Functors are needed in the same
> situations as units but had less expressive power (recursive/dynamic
> linking).
> — Matthias

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to