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: Wed, 26 Nov 2014 15:09:33 -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> <1kqnn4e05fbl2$.1wv2gk39uwsha.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1417036175 27201 24.196.82.226 (26 Nov 2014 21:09:35 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 26 Nov 2014 21:09:35 +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:23750 Date: 2014-11-26T15:09:33-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1kqnn4e05fbl2$.1wv2gk39uwsha.dlg@40tude.net... > On Tue, 25 Nov 2014 15:49:49 -0600, Randy Brukardt wrote: ... > It is not much different from how "sane" implicit dereference would work > > type Y is access Integer; > > function "abs" (Value : Y) return Integer > = abs (Value.all); > > I don't know how to describe such things syntactically. That is a > challenge. Exactly; without a syntax solution there's really not much point in the idea. I've tried to do that even in the limited case of finalization routines, and was unable to come up with anything that really worked. (The semantics is reasonably straightforward, but it has to be be written in a readable and hopefully natural way.) And I really can hardly imagine something that would work "always", given the differences between functions and procedures, and the need to handle out parameters, and so on. >> In a sense, Ada 2012 has delegation support as one can use expression >> functions that way. > > Yes, they could be viewed this way, but in my view they are too powerful. > What I want is a more limited mechanism of composition which could be > easily checked. The limitation is that the old body is used with an > epilogue and/or a prologue and conversions are applied to the arguments > and/or the result. If the body has to be changed, it must be overridden. It strikes me that renames-as-body can also be used in that way (for a more limited case). But you really would prefer something much more automatic, and that seems hard to do usefully. Randy.