From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Allocators and the requirement to raise `Storage_Error`
Date: Fri, 03 May 2013 10:36:22 +0200
Date: 2013-05-03T10:36:22+02:00 [thread overview]
Message-ID: <op.wwh16wl5ule2fv@cardamome> (raw)
In-Reply-To: 0cd370b8-d798-4080-b346-00b1527362e8@googlegroups.com
Le Fri, 03 May 2013 09:31:56 +0200, egilhh <egilhovik@hotmail.com> a écrit:
> On Friday, May 3, 2013 7:35:29 AM UTC+2, Hibou57 (Yannick Duchêne) wrote:
>> ARM 2012 @4.8 says:
>>
>>
>>
>> http://www.ada-auth.org/standards/12rm/html/RM-4-8.html
>>
>> > For an allocator with a subtype_indication, the
>>
>> > subtype_indication shall not specify a null_exclusion
>>
>
> This Ada Issue may clear things up for you:
> http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0104-1.txt?rev=1.4
>
> Basically, you have an access to an access, allocated with the default
> value,
> which is null for non-initialized access values.
You're right, that's obvious. I badly understand reading that part: it was
about the subtype of the allocated object, not of the returned access type.
I still wonder why there is no provision for an allocator to return `null`
instead of raising an exception, when a custom function of a constrained
subtype/type, which would provide the same functionality, does not get
imposed this obligation.
--
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University
next prev parent reply other threads:[~2013-05-03 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 5:35 Allocators and the requirement to raise `Storage_Error` Yannick Duchêne (Hibou57)
2013-05-03 7:31 ` egilhh
2013-05-03 8:36 ` Yannick Duchêne (Hibou57) [this message]
2013-05-03 9:33 ` Yannick Duchêne (Hibou57)
2013-05-03 23:17 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox