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,daca227a72518885 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-08 06:19:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!bos-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3F840ECB.273F718D@gbr.msd.ray.com> From: Steve O'Neill X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Unbounded Strings References: <20031007175516.DC2884C40C8@lovelace.ada-france.org> <3F840CBE.6080904@noplace.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 08 Oct 2003 09:19:07 -0400 NNTP-Posting-Host: 192.199.125.26 X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 1065619147 192.199.125.26 (Wed, 08 Oct 2003 09:19:07 EDT) NNTP-Posting-Date: Wed, 08 Oct 2003 09:19:07 EDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:460 Date: 2003-10-08T09:19:07-04:00 List-Id: Marin David Condic wrote: > > Pointers to strings are certainly possible in Ada, but that's kind of a > sign of a C/C++ programmer trying to utilize all their C/C++ idioms in a > different language. I remember quite a while back watching a C guy > struggling with Ada and trying to use 'Address everywhere in passing > parameters like strings to subroutines. He was convinced he needed to do > that to get a "by reference" parameter because he was so conditioned to > think that way by C. Obviously, you *can* do it that way - its just not > necessary and really makes your life harder. My favorite abuse of 'address though still has to be code I reviewed where the developer had many routines where he was passing addresses of locally declared variables out of procedures. This was code for a device driver and, of course, the reasoning was that "this would be faster". The good news was that this was caught during a review and never made it to the point of attempting to be run... although it would have been interesting to see the results. Steve O'Neill