links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Why aren't there packages and clusters?
Last updated at 2:35 pm UTC on 16 January 2006
> two orthogonal artifacts: packages and clusters.

Modules may both specify their composition (like clusters) and their contents (like packages). Packages and clusters separate these two responsibilities into two different concepts, along the lines of the Aggregate pattern. The present scheme allows one concept, modules, to handle both.

(Note: packages and clusters are used by ModSqueak/Ginsu and Digital's Team/V. Parameterized modules originate in the work of Joseph Goguen.)

By analogy you could divide methods/functions into code packages that hold statements and variables only, and function clusters which contain parameters and refs to other {function clusters OR code packages}.

I see two advantages in the present solution: you have one instead of two different concepts (three if you count the base class as in ModSqueak), both in the formal model and to keep in your head, and you also use familiarity and reduce the conceptual complexity by making a close analogy with methods (which take parameters that you provide when you "instantiate" the method).

I also hope it is clear that there is no lack of power in this scheme.

What is the difference between a package and a cluster? Stephane Ducasse