comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Question[s] about aliased extended return.
Date: Sat, 10 Nov 2012 01:34:32 -0600
Date: 2012-11-10T01:34:32-06:00	[thread overview]
Message-ID: <k7l02d$405$1@munin.nbi.dk> (raw)
In-Reply-To: op.wnhlszemule2fv@cardamome

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

"Yannick Duch�ne (Hibou57)" <yannick_duchene@yahoo.fr> wrote in message 
news:op.wnhlszemule2fv@cardamome...
...
>> No. Allowing "aliased" at all was a bug in Ada 2005; we preserved it only
>> for compatibility (some GNAT customers used it a lot).
>
>Why not list it in the Obsolescent Features section?

Obviously, if customers are using it enough to make this an issue, it's 
useful in some cases. And there is no alternative if you have to have a 
pointer to match some idiot API, so it's hard to call it obsolescent.

We believe that it can make sense to use for any object that requires 
build-in-place, which is where the "immutably limited" rule comes from, but 
it doesn't make sense if a temporary is involved. But that's all 
after-the-fact thinking; no one considered the implications when it 
originally put into the syntax and there doesn't appear to have been any 
original reason to allow it other than consistency with normal object 
declarations. (But whoever came up with that left out "constant", so they 
didn't do that very well, either.) Since the semantics don't make sense in 
general, and there was no identified need, it shouldn't have been there in 
the first place. The situation is different now, as the OP's example shows; 
since it was there, people figured out ways to use it.

                                                       Randy.







  reply	other threads:[~2012-11-10  7:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02 15:55 Question[s] about aliased extended return Shark8
2012-11-09  0:43 ` Randy Brukardt
2012-11-09  3:40   ` Yannick Duchêne (Hibou57)
2012-11-10  7:34     ` Randy Brukardt [this message]
2012-11-09 19:42   ` Shark8
2012-11-09 20:53     ` sbelmont700
2012-11-09 21:44       ` Yannick Duchêne (Hibou57)
2012-11-09 22:04         ` sbelmont700
2012-11-09 22:56           ` Shark8
2012-11-09 22:54         ` Shark8
2012-11-10  7:27           ` Randy Brukardt
2012-11-10 16:08             ` Shark8
2012-11-10  1:08     ` Jeffrey Carter
2012-11-10  1:52       ` Shark8
2012-11-10  2:17         ` Yannick Duchêne (Hibou57)
2012-11-10 10:59         ` Bill Findlay
replies disabled

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