ALU capability (was Re: [E-Lang] Authority -- what is its dual?)

Mark S. Miller markm@caplet.com
Mon, 22 Oct 2001 08:37:47 -0700


At 06:41 AM 10/19/2001 Friday, Richard Uhtenwoldt wrote:
>(define (PointMaker x y)
>  (lambda (message)
>    (message 
>      (lambda (out) 
>        (out 
>          (lambda (print <out's other method names here>) (print "<$x,$y>")) ))
>      (lambda () x)
>      (lambda () y)
>      (lambda (other) 
>        (PointMaker 
>          (+ x (other (lambda (printOn getX getY add) (getX))))
>          (+ y (other (lambda (printOn getX getY add) (getY)))) ))
>      )))
>(define p (PointMaker 3 5))
>(p (lambda (printOn getX getY add) (getX)))
>(p (lambda (printOn getX getY add) (add (PointMaker 4 8)))

Interesting.  But now a message is specific to the type of which it's a 
part, since it has an argument position for each of the message-selectors 
(message-names, verbs) of the type of which it's a part.  This is type based 
polymorphism, as opposed to E's and Smalltalk's name-based polymorphism.  
Which is fine, it's just different.

You end up doing much the same thing that a C++ compiler does: In a C++ 
"message" (invocation), the message name (virtual member function name) is 
compiled into a vtable offset.  Your messages also have to know which 
argument position corresponds to themselves, which amounts to the same 
thing.  Interesting.


>As long as Scheme can represent objects, I do not see why its having
>non-object data is a weakness.  

This is the crux of the matter.  The AYCDISAM stance of Act-1 and Joule is 
not simply that messages should be powerful enough that you don't need 
anything else.  It's that there must not be anything else.  This ensure that 
techniques like the LazyMaker of 
http://www.erights.org/elang/blocks/defPlumbing.html work everywhere, and 
can substitute for anything.

Another way to look at this is as the extreme of Scheme's philosophy of 
making things first class.  To an AYCDISAM programmer, non-object data is 
not first class.


        Cheers,
        --MarkM