help / color / mirror / Atom feed
From: "Randy Brukardt" <>
Subject: Re: Renaming primitives.
Date: Wed, 10 Jan 2024 20:09:57 -0600	[thread overview]
Message-ID: <unnikl$2nh4j$> (raw)
In-Reply-To: unm1m6$2ftcd$

"Dmitry A. Kazakov" <> wrote in message 
> On 2024-01-10 11:37, Blady wrote:
>> To my surprise (well I hoped) My_Log_3 is compiled by GNAT.
>> Is it conformed to the Ada standard?
> This looks like a bug to me. ARM 8.5.4 (2/3) states that the right part of 
> "renames" must be a name of a callable entity. My_Generic_Handler.Log is a 
> procedure call which is not a callable entity name.

A "prefixed view" is indeed a view of a callable entity. For instance, you 
can pass those as generic formal subprograms or rename them.

> Renaming a callable result of a function call might be legal [and quite 
> funny].

I believe that is legal as well.

> Disclaimer. I am not a language lawyer.

I'll refrain from a pithy remark. ;-)

> P.S. Specialization of subprograms would be a nice feature, though.

And Ada has had a limited form of it since Ada 2005. Limited because you can 
only eliminate the first parameter. (Of course, you can also eliminate the 
first two parameters, and so on. But you can't eliminate the third 
parameter, although you can default it and effectively eliminate from calls. 
Note that a renaming can change the defaults used for a subprogram call.)


  reply	other threads:[~2024-01-11  2:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 10:37 Renaming primitives Blady
2024-01-10 11:38 ` Jeffrey R.Carter
2024-01-11 10:06   ` Blady
2024-01-11 11:06     ` Jeffrey R.Carter
2024-01-10 12:13 ` Dmitry A. Kazakov
2024-01-11  2:09   ` Randy Brukardt [this message]
2024-01-11  2:18 ` Randy Brukardt
2024-01-11 10:09   ` Blady
2024-01-12  3:59     ` Randy Brukardt
2024-01-12  9:47       ` J-P. Rosen
2024-01-12 23:36         ` Lawrence D'Oliveiro
2024-01-12 10:29       ` Blady
2024-01-12 10:42     ` Blady
replies disabled

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