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,aa7f494bf30adbc7 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed1.sea.pnap.net!newsfeed2.sea.pnap.net!newsfeed.pnap.net!brmea-news-1.sun.com!news1brm.central.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: [newbie] simple(?) data structures Date: 22 Jun 2004 10:11:24 +0200 Organization: Sun Microsystems Message-ID: References: <2j1e30Fsrg8vU1@uni-berlin.de> <2jao1qFvj2rgU1@uni-berlin.de> <2jc33qFv3sitU1@uni-berlin.de> <1087475845.607135@master.nyc.kbcfp.com> <7MgAc.96169$dP1.314202@newsc.telia.net> <1087560281.744369@master.nyc.kbcfp.com> NNTP-Posting-Host: khepri06.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: new-usenet.uk.sun.com 1087891884 29351 129.159.112.195 (22 Jun 2004 08:11:24 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 22 Jun 2004 08:11:24 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:1769 Date: 2004-06-22T08:11:24+00:00 List-Id: >>>>> "HR" == Hyman Rosen writes: HR> Ole-Hjalmar Kristensen wrote: >> C++ has by-reference parameter passing if you want, so you don't need >> to use pointers for out parameters. However, as you cannot see from >> the signature of a function (except as a comment) whether the function >> modifies your parameter of not, I find this a mixed blessing. HR> Huh? If you pass by reference in C++ you get to declare the HR> parameters either as plain references or as const ones. You HR> certainly can tell this from the signature: HR> void mangle(const string &in, string &out); You are right of course. What I was really thinking of is that you cannot see it where the function is called, something which applies to both C++ and Ada. But modern IDE's let you jump to the definition of a function easily, so it's not much of a problem. -- C++: The power, elegance and simplicity of a hand grenade.