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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "Hans Malherbe" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 11 Mar 2005 00:48:04 -0800 Organization: http://groups.google.com Message-ID: <1110530884.091206.28650@z14g2000cwz.googlegroups.com> References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <42309456$1@news.broadpark.no> NNTP-Posting-Host: 196.8.104.31 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1110530892 22622 127.0.0.1 (11 Mar 2005 08:48:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 11 Mar 2005 08:48:12 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=196.8.104.31; posting-account=vaFgcA0AAADo7zN227lGnIpnwjwpYkPg Xref: g2news1.google.com comp.lang.ada:9112 comp.lang.c++:45091 comp.realtime:1255 comp.software-eng:4823 Date: 2005-03-11T00:48:04-08:00 List-Id: REH wrote: >C++ features I would to have in Ada: >* reference (in out) types in functions (without resorting >to access types) Here's a feature I want in both: Having the compiler force you to specify "in" or "out" at the call site. C# does this. The problem with C# is that "in" isn't deep. You know at the call site that the _value_ of an "in" parameter is not going to be mutated. What you don't know is whether any member functions is going to be called on your parameter that mutates it. This often makes "in" useless for parameters of user-defined type. Groete Hans