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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.164.236 with SMTP id yt12mr626878vdb.8.1400804451808; Thu, 22 May 2014 17:20:51 -0700 (PDT) X-Received: by 10.140.107.35 with SMTP id g32mr18133qgf.2.1400804451552; Thu, 22 May 2014 17:20:51 -0700 (PDT) Path: border1.nntp.dca.giganews.com!nntp.giganews.com!c1no14308842igq.0!news-out.google.com!gi6ni6673igc.0!nntp.google.com!hl10no3897023igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 22 May 2014 17:20:51 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Empty Bounded Containers From: sbelmont700@gmail.com Injection-Date: Fri, 23 May 2014 00:20:51 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:186566 Date: 2014-05-22T17:20:51-07:00 List-Id: Hi, In the sundry Ada distributions I have around, the "empty" bounded containe= rs are fully defined as having a capacity of zero, e.g. Empty_Vector : constant Vector :=3D (Capacity =3D> 0, others =3D> <>); which is not intuitively what I would assume. For instance, the following = line: x : BC.Vector (Capacity =3D> 42) :=3D BC.Empty_Vector; implies an container with a capacity of 42 initialized to a length of zero,= but it of course throws a constraint error. In fact, there really doesn't= seem to be any valid use of the Empty_Vector (et al), since the actual cap= acity is hidden in the private part. The LRM just says it should be the sa= me between the two without addressing the discriminant, which isn't much he= lp. =20 Moreover, the wording seems to legally contradict itself, since by stating = "If an object of type Vector is not otherwise initialized, it is initialize= d to the same value as Empty_Vector" it would seem to imply that=20 x : BC.Vector (Capacity =3D> 42); ought to use the values from the Empty_Container, causing the same error, l= eaving no actual way to ever have any bounded containers at all. Does anyone know what the intention actually is? -sb