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-Thread: a07f3367d7,a9916530bf157e77 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.182.6 with SMTP id ea6mr2891961wic.4.1367665344565; Sat, 04 May 2013 04:02:24 -0700 (PDT) Path: hg5ni66809wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.138.MISMATCH!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Depth First Search of a Char_Matrix? Date: Sat, 27 Apr 2013 20:26:09 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <87c89205-7fee-4d88-b4ab-08d26c03219b@googlegroups.com> <51cf6f75-c19b-4e08-a2be-f3133eedccfa@googlegroups.com> Mime-Version: 1.0 Injection-Date: Sun, 28 Apr 2013 03:22:57 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="656ea2f23126f57fb36504d2d15a002c"; logging-data="23362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5wwrTu/EuO1I1VjQVKWhRuB440FN5eqc=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <51cf6f75-c19b-4e08-a2be-f3133eedccfa@googlegroups.com> Cancel-Lock: sha1:GDsK5XTrKeZIgvrPpSXEdSfOnnY= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-04-27T20:26:09-07:00 List-Id: On 04/27/2013 11:16 AM, Shark8 wrote: > On Saturday, April 27, 2013 11:25:57 AM UTC-6, Jeffrey Carter wrote: >> >> There is absolutely no reason to use access types (especially not >> anonymous access types) or addresses for this problem. > > Sure, but there's no real reason not to: the illustration was simply a DFS on > something that might-not-exist and so null/some-object map to that perfectly > fine. (It's an error to ask "what color is the piece at X,Y?" when the > element X,Y contains no piece; this situation must be addressed somewhere, > and access/null works.) Yes, there are very good reasons not to. Zero/non-zero map to that perfectly fine, too, and don't carry with them all the opportunities of error that the manual memory management of access types do. But the fact is, this is a Boolean value and should be modeled as such. To the OP: Good Ada code never contains visible access types, nor non-visible access types that aren't absolutely essential. Addresses should never appear in code that doesn't absolutely have to be non-portable. -- Jeff Carter "Sheriff murdered, crops burned, stores looted, people stampeded, and cattle raped." Blazing Saddles 35