From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: confusion about message passing between the tasks Date: Sun, 26 Oct 2014 21:42:24 +0100 Organization: cbb software GmbH Message-ID: <175nrio3t8ima.vdesn04mg89f$.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: Xn+ybM2JynFOXdIT5N5zBw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:22783 Date: 2014-10-26T21:42:24+01:00 List-Id: On Sun, 26 Oct 2014 16:27:34 -0400, Robert A Duff wrote: > "J-P. Rosen" 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. You cannot program in a procedural way with PO. You can implement equivalent semantics, possibly, but not the program structure. An extreme scenario (unfortunately not Ada's annex E), a distributed system could be decomposed around rendezvous between tasks running on physically distributed nodes. This cannot be done with PO. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de