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.6 required=5.0 tests=BAYES_00,LOTS_OF_MONEY, TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-09 08:47:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!news-in-sanjose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9pgr68$7pu1@news.cis.okstate.edu> <9phnic$9g5$1@nh.pace.co.uk> <5fkv7.134136$w7.19988807@news02.optonline.net> <9pski60j31@drn.newsguy.com> Subject: Re: ada vs. cpp Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Tue, 09 Oct 2001 11:46:50 EDT Organization: http://www.newsranger.com Date: Tue, 09 Oct 2001 15:46:50 GMT Xref: archiver1.google.com comp.lang.ada:14041 Date: 2001-10-09T15:46:50+00:00 List-Id: In article , Mike Mohr says... > >Since we are discussing orthogonal language features >which constitute string defects if not present, how >do I explicitly pass Ada strings by value or reference? Since its fairly easy for the compiler to figure out which will be more efficient at compile time (which is what Ada does), the only reason you would need for doing this would be if you want to do it *less* efficiently. Odly, noone has really found that need that I have heard of. :-) Well, there is one other use: in interfacing to external routines. That's where Ada's interface support comes in. I'm curious how you think you do this in C++ though. An array of chars is essentially a pointer, and thus will always get passed by reference no matter what you do. "string" is an opaque type defined in the STL almost certianly using pointers, and is thus in the same boat. So how do you force value? --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.