why isolated components

Joachim Durchholz joachim.durchholz@REDACTED
Thu Aug 21 17:04:03 CEST 2003


Laszlo Varga wrote:
> Really, why?
> What are the (main) motivations for kind a system?

Let me rephrase, in the hopes that I understood your question correctly:
What is the main motivation for isolating components?

The answer is simple. If you double the number of names in a program, 
the number of unwanted possible interaction quadruples. More generally, 
for N items, you have N*(N-1)/2 possible interactions.

The number of *intended* interactions between components grows roughly 
linearly (I think it's usually on the order of N*log(N), but whether 
it's really linear or not doesn't matter: the main point is that the 
number of wanted interactions is massively less than O(N*N)).

In other words, the number of unwanted potential interactions grows in 
an approximately quadradic correlation with program size.

To keep the number of potential interactions down, Parnas propagated 
"information hiding", cutting down on the number of interactions that a 
compiler will allow. (Information hiding is not intended to prevent 
programmers from looking into components, its for preventing components 
from looking into other components.)

Just my thoughts on the subject.
HTH
Jo




More information about the erlang-questions mailing list