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-Google-Thread: a07f3367d7,66fae8c862b81b17 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.224.189.16 with SMTP id dc16mr1784828qab.0.1351893785400; Fri, 02 Nov 2012 15:03:05 -0700 (PDT) Received: by 10.52.19.201 with SMTP id h9mr681220vde.0.1351893785377; Fri, 02 Nov 2012 15:03:05 -0700 (PDT) Path: gf5ni17826425qab.0!nntp.google.com!c7no3794667qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 2 Nov 2012 15:03:05 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.65.97.192; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 77.65.97.192 References: <1aWdnbcg_8-BzAzNnZ2dnUVZ_j6dnZ2d@giganews.com> <559eb706-9bb1-496d-9034-1984d693531a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5460fdc7-5490-4889-b771-67cc281c10c5@googlegroups.com> Subject: Re: Copy vector in Ada From: Maciej Sobczak Injection-Date: Fri, 02 Nov 2012 22:03:05 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: 2012-11-02T15:03:05-07:00 List-Id: W dniu pi=C4=85tek, 2 listopada 2012 12:20:04 UTC+1 u=C5=BCytkownik Hibou57= (Yannick Duch=C3=AAne) napisa=C5=82: > Ada is not C/C++, if the assignment operator is available in a type =20 > interface, that means it is safe to use. I'm not sure what you mean by this. The rules and their implications are pr= etty similar in Ada and in C++. In other words, if you have an example of unsafe C++ code (that is, unsafe = in relation to the assignment operator), I think there should be an equival= ent example in Ada as well. > When the assignment operator =20 > would not be safe to use and/or would cost too much to the implementation= =20 > to be made available safely, then Ada has well know way to exclude it fro= m =20 > the interface: =E2=80=9Climited type=E2=80=9D. Similarly in C++ - if the assignment operator is too costly (or just imposs= ible) to implement, there is a way to ban it. > So, yes, if =E2=80=9C:=3D=E2=80=9D is available in the interface, that me= ans it's not a hack =20 > to use it. Unless the author of the type forgot to implement it properly? --=20 Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com