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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,66fae8c862b81b17 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.66.86.194 with SMTP id r2mr3341992paz.42.1352140978530; Mon, 05 Nov 2012 10:42:58 -0800 (PST) Path: 6ni63667pbd.1!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Copy vector in Ada Date: Mon, 5 Nov 2012 19:42:57 +0100 Organization: cbb software GmbH Message-ID: <1k3sjasg1wftm$.1vlq5hm7vukhk.dlg@40tude.net> References: <1aWdnbcg_8-BzAzNnZ2dnUVZ_j6dnZ2d@giganews.com> <559eb706-9bb1-496d-9034-1984d693531a@googlegroups.com> <5460fdc7-5490-4889-b771-67cc281c10c5@googlegroups.com> <6260a796-83c4-4ce5-88cb-8249846bc035@googlegroups.com> <10y91ckm54l57$.8u8bbq342u1b.dlg@40tude.net> <2164bc1a-a841-46ed-bfef-4ddcae4d64f7@googlegroups.com> <1ccf2169-418c-44b7-9d5a-b684a017fbe7@googlegroups.com> <1r3lpzblxy43h$.zytp8ur1bg27$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: pSb85Ij4EqcuHDcWtw64BQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 2603 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Date: 2012-11-05T19:42:57+01:00 List-Id: On Mon, 05 Nov 2012 18:22:45 +0100, Yannick Duchêne (Hibou57) wrote: > Le Mon, 05 Nov 2012 10:20:44 +0100, Dmitry A. Kazakov > a écrit: >> There are lots of further questions about special treatment of copy >> constructors, like whether one could introduce them later, e,g, promoting >> limited types to non-limited > Would make sense, with a derived type adding capabilities (similar comment > with unknown discriminant). The proof it would make sense is that in a > package spec, you can change a limited to a non‑limited, without breaking > anything. > >> and demoting back. > Back from non‑limited to limited? This one is not cool. But "constant T" is cool? Note that constant does just this and also disallows any other mutators. It is not that simple. However you bend a type you inevitably break something. So it actually depends on whether substitutability violations could be detected statically. If yes, everything is cool. Any dynamic checks are evil per definition, only permissible if the alternative is worse. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de