From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: confusion about message passing between the tasks
Date: Sun, 26 Oct 2014 16:27:34 -0400
Date: 2014-10-26T16:27:34-04:00 [thread overview]
Message-ID: <wcc38aapoeh.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: m2i1aq$eq1$1@dont-email.me
"J-P. Rosen" <rosen@adalog.fr> writes:
> Le 26/10/2014 00:23, Robert A Duff a écrit :
>> I prefer protected objects. Less coupling: two tasks can communicate
>> with each other with neither one knowing the identity of the other --
>> they both just know about the protected object.
>>
>> If I were redesigning Ada from scratch, I'd leave out rendezvous.
>> Everything you can do with rendezvous you can do with (something like)
>> protected objects.
>
> ... and everything you can do with structured statements you can do with
> if and goto.
OK, then I'll make a stronger claim: Everything you can do with
rendezvous you can do with (something like) protected objects,
and do it just as cleanly, and sometimes even better.
Now you're goto analogy doesn't work. ;-) I like case statements
and while loops.
> I strongly disagree with this position. Rendezvous is a nice model that
> implements directly a client-server model. Of course, in this model, the
> client has to know the server. So what?
>
> I view protected objects as a much lower level abstraction than
> rendezvous; they are nice for simple synchronisation and simple needs,
> but they don't scale up well for higher level abstactions.
I agree rendezvous is higher level than PO's, but "higher level"
is not always synonymous with "better". I find PO's to be at
the *right* level. Ada 83 tasking has some baroque bells and
whistles that, though they could reasonably be considered
"high level", the just get in the way.
In Ada 83, I found that in between every pair of communicating tasks,
I wanted to add a passive "buffer" task or some such. I'm happy
to use a PO there.
>...Try to
> Ravenscarize (!) existing software that uses rendezvous, and you'll see
> what I mean (I did that recently).
That's not a fair comparison, because Ravenscar is far more restricted
than just "no rendezvous". For example, I find the queue-length-1
restriction pretty onerous.
> And don't forget that with PO, you lose a very nice and poweful feature
> of rendezvous: automatic termination.
That's why I used the weasel words "(something like)". I would extend
PO's to support everything that rendezvous can do, and eliminate
rendezvous. It's tricky to figure out how terminate alternatives
should work with PO's, but I think I've got it. Another thing
is that you'd want multi-way call.
I don't mean to say rendezvous is a Bad Thing. It's just not necessary
when you have (something like) PO's, and it adds a lot of complexity
to the language. I'm pretty sure that if Ada 83 had PO's, Ada 95
would NOT have added rendezvous!
- Bob
next prev parent reply other threads:[~2014-10-26 20:27 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 16:44 confusion about message passing between the tasks compguy45
2014-10-24 18:39 ` Ludovic Brenta
2014-10-25 1:51 ` compguy45
2014-10-25 7:13 ` Ludovic Brenta
2014-10-24 23:49 ` Stribor40
2014-10-25 7:03 ` Ludovic Brenta
2014-10-25 7:58 ` Simon Wright
2014-10-25 13:01 ` compguy45
2014-10-25 14:11 ` Simon Wright
2014-10-25 17:25 ` Dennis Lee Bieber
2014-10-25 17:54 ` Jeffrey Carter
2014-10-25 22:23 ` Robert A Duff
2014-10-25 23:26 ` compguy45
2014-10-26 4:50 ` Dennis Lee Bieber
2014-10-26 10:20 ` Georg Bauhaus
2014-10-26 5:37 ` J-P. Rosen
2014-10-26 8:14 ` Pascal Obry
2014-10-26 15:47 ` J-P. Rosen
2014-10-26 20:27 ` Robert A Duff [this message]
2014-10-26 20:31 ` Robert A Duff
2014-10-26 20:36 ` Jeffrey Carter
2014-10-26 22:27 ` Robert A Duff
2014-10-26 23:23 ` Jeffrey Carter
2014-10-27 0:46 ` Robert A Duff
2014-10-27 2:18 ` Jeffrey Carter
2014-10-27 7:51 ` J-P. Rosen
2014-10-27 7:44 ` J-P. Rosen
2014-10-26 20:42 ` Dmitry A. Kazakov
2014-10-26 21:15 ` Brad Moore
2014-10-27 9:22 ` Dmitry A. Kazakov
2014-10-26 22:20 ` Robert A Duff
2014-10-27 7:40 ` J-P. Rosen
2014-10-25 23:42 ` compguy45
2014-10-25 23:55 ` compguy45
2014-10-26 0:24 ` Jeffrey Carter
2014-10-26 0:41 ` compguy45
2014-10-26 11:30 ` Brian Drummond
2014-10-26 15:40 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox