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,FREEMAIL_FROM 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!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Thu, 17 Jun 2004 08:37:25 -0400 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040502) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [newbie] simple(?) data structures References: <2j1e30Fsrg8vU1@uni-berlin.de> <2jao1qFvj2rgU1@uni-berlin.de> <2jc33qFv3sitU1@uni-berlin.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1087475845.607135@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1087475845 11763 204.253.250.10 Xref: g2news1.google.com comp.lang.ada:1616 Date: 2004-06-17T08:37:25-04:00 List-Id: Jeffrey Carter wrote: > If you've used C a lot, it's an even better idea to avoid pointers, > so you can learn how many situations that require pointers in C do > not require them in Ada. It would be nice if there was a tutorial explaining why this is so and showing how to take C code with pointers and transform it into Ada code without pointers. It's mainly about string handling, since that's where most of C's pointer manipulation takes place. The other eliminatable situation I can think of involves factory methods in OO when you don't need to keep a created object around permanently, so that you can use classwide types and return them by value. Then there's the usual bit about stepping through an array by pointer instead of index, but that's not a requirement in C, merely an optimization. Do you know of any such tutorial?