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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,28cd155693714664 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-22 21:50:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1a) Gecko/20020619 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Faulty languages and Liability References: <3D11F304.9030906@mail.com> <3dk*NGnrp@news.chiark.greenend.org.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <%rcR8.6726$cE5.5860@nwrddc02.gnilink.net> Date: Sun, 23 Jun 2002 04:50:03 GMT NNTP-Posting-Host: 162.83.247.204 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1024807803 162.83.247.204 (Sun, 23 Jun 2002 00:50:03 EDT) NNTP-Posting-Date: Sun, 23 Jun 2002 00:50:03 EDT Xref: archiver1.google.com comp.lang.ada:26615 Date: 2002-06-23T04:50:03+00:00 List-Id: Robert A Duff wrote: > Yes. Also, you can't make a pointer to a stack variable (or component, > etc) without explicitly declaring it "aliased". That is only a notational device to inform the reader of the code. > Oh, yeah, you can't "cast away const" in Ada. At least not with a > normal type_conversion. C++ has const_cast<> for this, although an old C-style cast must continue to work for backwards compatibility. And since C++ adopted the mutable keyword, it's not even especially needed at all. Notice that in both C and C++ it is illeall to cast away constness from an actual const object. You may only do it to something which is "accidentally" const because of parameter passing or references.