[comp.sw.components] run-time binding

johnson@p.cs.uiuc.edu (06/21/89)

>>>   I don't perceive any need for run-time binding.
>> 
>> Consider a windowing system.

>   I think not; the "large window" can simply rendezvous with each of its 
>   subwindows (an array of tasks) in order to notify them of the redisplay
>   requirement.  In turn, the subwindows then rendezvous with application-
>   specific tasks as necessary.

Talk about using an A-bomb to kill flys!  When a Smalltalker mentions
message sending, he or she means something very different from Ada tasking.
Message sending means run-time binding, which is orders of magnitude more
efficient than tasking.  Sure, an Ada programmer can use tasking for this
purpose, but it is the wrong way to think about the problem and the wrong
way to implement it.  If I were stuck with Ada I would probably handle
things this way, too, and encapsulate the tasking so that I don't have to
think about it.  However, it is harder to use and much less efficient than
run-time binding.

Run-time binding is useful in lots of places.  Most uses of case
statements could profitably be replaced by late-bound procedure
calls.  Run-time binding in languages like C++ is very efficient,
we use late-bound procedure calls in every interrupt in our multiprocessor
operating system, and the performance is fine.  Rendezvous, on the other
hand, is notoriously slow.  In general, parallel programming is hard to
think about.  O-O message sending is easy to think about, however, because
there is no possibility of time-dependencies.

Ralph Johnson