Split Capabilities: Making Capabilities Scale

Norman Hardy norm@netcom.com
Wed, 26 Jul 2000 07:39:39 -0700


At 1:12 -0700 00/07/26, Mark S. Miller wrote:
>At 09:05 PM 7/25/00 , Norman Hardy wrote:
>>The increment facet of the updown counter may be delivered to the car
>>counting agent at the garage entrance ...
>
>I love this example.  However, Alan's objection that "increment" is a more
>informative message name than "do" still applies so far.  First, I'd like to
>make clear that my example was not intended as an example of good
>programming style, but a demonstration of a case that can occur in any of
>the capability systems under discussion.  Programmers cannot be forced to
>give their programs meaningful message names.
>

Good point. In fact my example illustrates that point. The exit counter and
entry counter are each ignorant of whether the cars are comming or going.
Only the distributer of the 'thunks' knows. ("Thunk" is the Lisp term for a
function of 0 arguments and no return value.)

In Scheme you might make a counter instance by evaluating:
(let ((x 0)) (list (lambda () (set! x (+ x 1))) (lambda () (set! x (- x
1))) (lambda()x)))
which yields a list of three anonymous procedures that do the trick.

It all goes back to the scope of field names for structures, at least if
you follow the C++ lineage. If I pass you a function or an integer you can
call the value whatever you want. Field names are different unfortunately.

More later
Norman Hardy  <http://www.mediacity.com/~norm>