Split Capabilities: Making Capabilities Scale

Karp, Alan alan_karp@hp.com
Mon, 31 Jul 2000 11:19:49 -0700


> -----Original Message-----
> From: Mark S. Miller [mailto:markm@caplet.com]
> Sent: Monday, July 31, 2000 10:40 AM
> To: Karp, Alan
> Cc: 'Jonathan S. Shapiro'; 'Ralph Hartley'; e-lang@eros-os.org
> Subject: RE: Split Capabilities: Making Capabilities Scale
> 
> 
> At 10:19 AM 7/31/00 , Karp, Alan wrote:
> > > From: Jonathan S. Shapiro [mailto:shap@eros-os.org]
> > > The *program* sees only the behavior that it's programmer 
> > > intended it should
> > > see. It is not the *program* that requires total 
> knowledge, it is the
> > > *programmer*.
> >
> >What I've been trying to say, apparently incoherently.
> 
> But remember, programmers never have total knowledge, so 
> fortunately they 
> also don't require it.  I believe we all earlier agreed with 
> this sentiment, 
> as with Chinese tea prices.
> 

I didn't intend to agree with your statement.  In the real world,
programmers don't have "total knowledge" (whatever that is), but many bugs
can be traced back to this fact.  Interface definitions, with their
associated documentation, are an attempt to provide this information.  I
believe that the object's state transition diagram may be a be a better
approach.  I only need the interface when I need to access the state or to
change the state in some way that I understand.  Nevertheless, I (the
programmer) may need to know the possible ways that others might change the
state if I am to produce a correct program.

If I write a program to use a certain object O1, I am aware of the visible
state of O1.  If that results in a change of the state of some object O2
whose state I'm unaware of, so be it.  I can't distinguish changes in the
state of O2 from that of the private part of O1; hiding the implementation
is good programming practice.  In particular, the programmer of O1 is free
to move private state to O2 as long as O1's contract is still honored.  I
think we're in big trouble if that's not the case.  So, if I write a program
that lets you print a file, I don't care if the price of tea in China is a
private variable in the printer object or in the state of the China economy
object.

> 
>          Cheers,
>          --MarkM
> 

_________________________
Alan Karp
Decision Technology Department
Hewlett-Packard Laboratories MS 1U-2
1501 Page Mill Road
Palo Alto, CA 94304
(650) 857-3967, fax (650) 857-6278