Hello, Racket’s units predate its module system. Indeed, it would seem that units were originally intended to *be* Racket’s module system, but evidently, that did not work out. My understanding is their replacement was due in large part to the desire for a more predictable macro compilation model, so Racket’s phased module system is by necessity far more statically bound than units were ever designed to be (if anything, units seem to have been designed with the express purpose of dynamic linking, which is hard to reconcile with compile-time macroexpansion).
Recently, however, I stumbled upon the paper in which the unit system was initially presented, “Units: Cool Modules for HOT Languages” by Flatt and Felleisen, and it outlines some interesting, reasonably compelling motivations for dynamic linking of first-class modules. However (though my memory may be imperfect here), I think I remember Matthias mentioning at some point that units were one of the areas where Racket “got it wrong”, and evidently whole-program construction via units did not pan out. I’m curious about this, since units are still distributed with Racket, so they clearly weren’t so wrong that they needed to be relegated to the dustbin, and in theory they still have all the interesting properties motivated by the original paper. Despite that, units seem essentially unused in Racket except in a few small places to allow modules with circular dependencies, not really taking advantage of any of units’ additional expressive power. My question to the list is therefore this: are units truly “dead”, or do they have redeeming qualities? Are there some situations where units might be preferable to a solution involving, say, first-class functions or the object system? If there are useful applications for units, why are they essentially unused in modern Racket programming? Are units theoretically useful but lacking in some implementation property that makes them practically viable? If so, is that practical flaw inherent to the concept of dynamically-linked, first-class modules, or is it merely a deficiency in Racket’s implementation? Apologies for the meandering set of questions, but I am quite curious to know more about this particular abstraction from the people who experienced it, since its exploration long predates my exposure to Racket. Alexis -- 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 to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.