Java's modules rock? (was Re: election details *PLEASE READ*)

Lex Spoon lex at lexspoon.org
Thu Mar 8 01:17:57 UTC 2007


You mention several fascinating ideas.  Let me just defend what I mean
on this one issue, and toss out a suggestion of my own.

Andreas Raab <andreas.raab at gmx.de> writes:
> What I am
> interested in, however, is not a components utopia (btw, your write-up
> was the most painful thing I've ever read from you because it is so
> full of baseless presumptions)

I agree it is painful in the abstract, because the concept is
inherently illogical!  Let us look at a concrete example:


"Well, that's great as long as it is *your* foot. Unfortunately, when
modifying a base class that other modules use you are not shooting
your own foot - you are shooting the *other* guys foot (since your
module will work happily with those modifications but the other
modules won't) and that's not okay for a module system."


Your argument here is that feature X allows modules to mess each other
up. The perfect module system must absolutely forbid modules to mess
each other up.  Therefore, X is disallowed.

The components utopia is the second to last sentence: The perfect
module system must absolutely forbid modules to mess each other up.
That's obviously too extreme, right?  Utopian, some might say?

Believe me, I do not mean to beat up on your simplification here.
It's just a simplification.  Perhaps, though, if you try to be more
precise here, then there is a deeper understanding to be had.  What,
precisely, does it mean for modules to allow *limited* interaction, as
opposed to the extremes of non-interaction or blatantly stepping all
over each other?

When considering it, keep in mind that even a network connection--a
terrific metaphor, by the way--is plenty for one module to mess up
another one.  Further, once you can mess up one module, you can also
mess up modules that that module talks to.  A partial-interference
property is hard to define!

Curiously, component systems can succeed even when they allow lots of
interference between packages.  I'm thinking of Debian packages.
Debian packages are your nightmare, Andreas: practically everything is
in a global scope, just begging for inter-package conflicts!  Yet,
Debian manages to produce 10k of these packages which all get along
together.  How can this be?


I think their success is due to how they set up their package sharing.
Debian has a great answer to the following question: what do you do
when, as is inevitable, two packages conflict?


Lex





More information about the Squeak-dev mailing list