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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-26 10:48:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: 26 Sep 2003 13:43:38 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <1064527575.648809@master.nyc.kbcfp.com> <3F739C1D.4030907@attbi.com> <6ev7nvc9houpb66ishpkm3h8ref7l6eu7c@4ax.com> <1064581201.987573@master.nyc.kbcfp.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1064598389 23963 128.183.235.92 (26 Sep 2003 17:46:29 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 26 Sep 2003 17:46:29 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:43003 Date: 2003-09-26T17:46:29+00:00 List-Id: Hyman Rosen writes: > Stephane Richard wrote: > > Indeed Matthew, thye seem to be using Type casting > > No, there's no type casting. > > C++'s std::string objects have c_str and data methods, both > of which return a pointer to a const array of characters. > That pointer remains the propertry of the string, and is valid > until a potentially mutating operation is performed on the string. Is the "validity" of the pointer checked after a mutating operation is performed, or is it up to the programmer to be aware of that? If it is not checked, that explains why Ada did not provide the equivalent operation; Ada doesn't assume the programmer will obey the rules :). -- -- Stephe