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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: orthogonal inheritance and extension aggregates Date: Sat, 20 Jul 2013 00:49:41 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1374299382 1699 69.95.181.76 (20 Jul 2013 05:49:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 20 Jul 2013 05:49:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2163 Xref: number.nntp.dca.giganews.com comp.lang.ada:182603 Date: 2013-07-20T00:49:41-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:igo2b70i4ox.t5duix9weguc$.dlg@40tude.net... ... > P.S. I don't know if Ada 2012 silently inherits from null extension. I > heard that there was an intention to add the kludge. Though semantically > broken it would save programs like yours. That's actually an Ada 2005 feature - see 3.9.3(4/2). One that I was against because it introduces a maintenance problem (null extensions tend to turn into non-null extensions over time, and once that happens, the feature stops working). It appears that GNAT failed to properly implement this feature in the case described by the OP. OTOH, as soon as the OP starts adding components to the extension, they'll have the problem again. (I don't think it is practical to extend the predefined containers, particularly because it's impossible to derive a cursor type to go with the extended container -- so you either end up with broken typing or you have do everything twice. And there are a lot of functions that have to be overridden.) Randy.