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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: confusion about message passing between the tasks Date: Sun, 26 Oct 2014 06:37:04 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 26 Oct 2014 05:37:30 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="214e2226c9a2cb4f71713357be0d6925"; logging-data="15169"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UOt4LgyG704lkdPK4+izQ" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Cancel-Lock: sha1:CTfPtPoTNTe0YoD0Uy19RGEb2O4= Xref: news.eternal-september.org comp.lang.ada:22743 Date: 2014-10-26T06:37:04+01:00 List-Id: 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. 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. Try to Ravenscarize (!) existing software that uses rendezvous, and you'll see what I mean (I did that recently). And don't forget that with PO, you lose a very nice and poweful feature of rendezvous: automatic termination. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr