comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Equivalence between named access and anonymous access.
Date: Thu, 7 Sep 2023 02:20:02 +0200	[thread overview]
Message-ID: <udb4vi$2jl81$1@dont-email.me> (raw)
In-Reply-To: <uda2ql$2hle9$1@dont-email.me>

On 2023-09-06 16:37, Blady wrote:
> 
> I'm wondering about named access and anonymous access.

The rules for using access-to-object types are

1. Don't use access types
2. If you think you should use access types, see rule 1.
3. If you still think you should use access types, don't use anonymous access types
4.  If you still think you should use anonymous access types, don't develop software

The semantics of named access types are well defined and easily understood. The 
semantics of anonymous access types are defined in ARM 3.10.2, of which the AARM 
says

"Subclause 3.10.2, home of the accessibility rules, is informally known as the 
'Heart of Darkness' amongst the maintainers of Ada. Woe unto all who enter here
(well, at least unto anyone that needs to understand any of these rules)."

The ARG freely admits that no one understands 3.10.2, which means that what you 
get when you use anonymous access types is whatever the compiler writer thinks 
it says. This may differ between compilers and between different versions of the 
same compiler, and from what you think it says.

So no sane person uses them.

-- 
Jeff Carter
“Companies who create critical applications—those
with a low tolerance for risk—would do well to use
Ada for those applications, even if they're more
familiar with other languages like C and C++.”
Mike Jelks
207

      parent reply	other threads:[~2023-09-07  0:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 14:37 Equivalence between named access and anonymous access Blady
2023-09-06 15:54 ` Dmitry A. Kazakov
2023-09-07 16:06   ` Blady
2023-09-07 16:18     ` Jeffrey R.Carter
2023-09-07 19:10       ` Blady
2023-09-07 20:23     ` Dmitry A. Kazakov
2023-09-06 20:55 ` Gautier write-only address
2023-09-07  0:20 ` Jeffrey R.Carter [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