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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Should weak counted reference be able to be strengthened? Date: Tue, 25 Nov 2014 15:49:49 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7d9r3whe43z8$.1f2l3n5cz0zh0$.dlg@40tude.net> <1tlppwq452jbq$.d1y3trfego8b$.dlg@40tude.net> <1xbl1kdcf9at5.1dfv4py4kvx0o.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1416952190 9382 24.196.82.226 (25 Nov 2014 21:49:50 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 25 Nov 2014 21:49:50 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:23720 Date: 2014-11-25T15:49:49-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1xbl1kdcf9at5.1dfv4py4kvx0o.dlg@40tude.net... ... > Instead of introducing "crazy beautiful" implicit dereference, Ada 2012 > should have delegation support for the patterns like this. Depending heavily on interfaces is a sure way to madness. :-) But the real problem here is I don't see any way to add "delegation support" that actually saves much over the explicit version that you showed. We certainly don't want *everything* to delegate (it has to be declared somehow for the particular operations in question), and because of overloading we have to at least have the complete profile. That means an awful lot of typing (and source text to read), and lots of chance for errors. In a sense, Ada 2012 has delegation support as one can use expression functions that way. (If I had gotten the full design in place, they could have been used with an interface type to provide a default implementation as well, which could have been designed to delegate. But we left out the two options for expression functions [staticness, and the interface cases].) Randy.