comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Should weak counted reference be able to be strengthened?
Date: Wed, 26 Nov 2014 15:09:33 -0600
Date: 2014-11-26T15:09:33-06:00	[thread overview]
Message-ID: <m55fif$qi1$1@loke.gir.dk> (raw)
In-Reply-To: 1kqnn4e05fbl2$.1wv2gk39uwsha.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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.



      parent reply	other threads:[~2014-11-26 21:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 11:07 Should weak counted reference be able to be strengthened? Natasha Kerensikova
2014-11-21 13:16 ` Dmitry A. Kazakov
2014-11-21 15:00   ` Natasha Kerensikova
2014-11-21 16:50     ` Dmitry A. Kazakov
2014-11-21 18:24       ` Natasha Kerensikova
2014-11-21 19:36         ` Dmitry A. Kazakov
2014-11-21 22:28           ` Randy Brukardt
2014-11-22  9:57           ` Natasha Kerensikova
2014-11-22 10:19             ` Dmitry A. Kazakov
2014-11-22 10:36               ` Natasha Kerensikova
2014-11-22 11:15                 ` Dmitry A. Kazakov
2014-11-21 22:39       ` Randy Brukardt
2014-11-21 22:49         ` Shark8
2014-11-22  8:42           ` Dmitry A. Kazakov
2014-11-22  8:42         ` Dmitry A. Kazakov
2014-11-24 22:15           ` Randy Brukardt
2014-11-25  8:36             ` Dmitry A. Kazakov
2014-11-25 21:49               ` Randy Brukardt
2014-11-26  9:28                 ` Dmitry A. Kazakov
2014-11-26 17:51                   ` brbarkstrom
2014-11-26 21:09                   ` Randy Brukardt [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox