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: a07f3367d7,c9d5fc258548b22a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How do I write directly to a memory address? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <31c357bd-c8dc-4583-a454-86d9c579e5f4@m13g2000yqb.googlegroups.com> <05a3673e-fb97-449c-94ed-1139eb085c32@x1g2000yqb.googlegroups.com> <8r86vgFc3uU1@mid.individual.net> <19fh1chm74f9.11cws0j5bckze.dlg@40tude.net> <5d9bd120-4953-4fb1-a890-27267245e954@8g2000prt.googlegroups.com> <544076dc-3357-4d8d-bfeb-7ae46a88b931@w19g2000yqa.googlegroups.com> <9bt91saw1vao$.9o7azvb4ina6$.dlg@40tude.net> Date: Tue, 8 Feb 2011 19:14:00 +0100 Message-ID: <1aragtrfhwg4w$.1c1eyyf8254pw$.dlg@40tude.net> NNTP-Posting-Date: 08 Feb 2011 19:13:57 CET NNTP-Posting-Host: 6d6bf93c.newsspool3.arcor-online.net X-Trace: DXC=;5Q8:KJ99FGlU`@c^jLCbJMcF=Q^Z^V3H4Fo<]lROoRA8kF9SfENmIMHYS?5AeI@@ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:17979 Date: 2011-02-08T19:13:57+01:00 List-Id: On Mon, 7 Feb 2011 15:11:23 -0800 (PST), Maciej Sobczak wrote: > On Feb 7, 10:24�am, "Dmitry A. Kazakov" > wrote: > >>> The contract is not broken. The function cannot modify the original >>> value that is passed by copy (this being the very nature of "copy") >>> and the caller cannot even reason about what happens behind the >>> signature. >> >> It is broken because const T is not substitutable for T. Mutators of the >> type T are not operations of const T. q.e.d. > > q.e.d. what? 1. const T /= T 2. not (const T <: T) > I have an impression that we are (again) in the mode where you bring > arbitrarily twisted definitions in order to prove your point. > > What contract is broken? > > Why do you want to substitute one type by another? Because one is passed as a parameter where another is declared, expected and used. This is substitution. > These are not > generics, nor other type-dependent constructs, so type substitutions > are out of the picture. Not at all. const T and T are distinct [sub]types. The types are different because the sets of operations defined on them are. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de