From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ac8:78d:: with SMTP id l13mr36815809qth.86.1570556302388; Tue, 08 Oct 2019 10:38:22 -0700 (PDT) X-Received: by 2002:a9d:7359:: with SMTP id l25mr24620824otk.329.1570556302052; Tue, 08 Oct 2019 10:38:22 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!o24no9197950qtl.0!news-out.google.com!q23ni377qtl.1!nntp.google.com!o24no9197945qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 8 Oct 2019 10:38:21 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.41.2.250; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 93.41.2.250 References: <3113a338-c9fd-4c9e-8197-9aca91d2b1d5@googlegroups.com> <9d5d30fd-028c-4a5d-9609-e101947e076a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2e07a635-8251-4fc0-8a9d-7ea8ef957749@googlegroups.com> Subject: Re: Funny (so to say...) interaction of "not null" and Vectors? From: mockturtle Injection-Date: Tue, 08 Oct 2019 17:38:22 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57266 Date: 2019-10-08T10:38:21-07:00 List-Id: On Tuesday, October 8, 2019 at 6:25:01 PM UTC+2, J-P. Rosen wrote: > Le 08/10/2019 =C3=A0 18:01, mockturtle a =C3=A9crit=C2=A0: > > Answering my own post... I removed all the "not null" requirements and= the exception disappeared... So, I guess my idea makes sense. > >=20 > > Nevertheless, if you have any remark, I'll be happy to hear them. > >=20 > A container has a capacity, which consists of a number of (not yet) used > elements, in order to decrease the number of reallocations. These extra > elements are not initialized, which is not allowed per your "not null" > declaration. >=20 > --=20 > J-P. Rosen > Adalog > 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX > Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 > http://www.adalog.fr Would it make sense to have an aspect that requires that the formal type of= a generic package allows for default initialization? (records with not nul= l access types do not allow that) I am thinking something like generic type T is private=20 with Default_Initializable; package Foo is=20 ... end Foo; without the Default_Initializable it would not be allowed, say, to create a= n array of T without explicitly initialize them.=20 That would had saved me few head-scratching...