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: 103376,ec21c3c7cdc7ff3e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: private types Date: 18 Mar 2006 07:56:45 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1142279908.327131.230200@j52g2000cwj.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1142686605 17545 192.74.137.71 (18 Mar 2006 12:56:45 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 18 Mar 2006 12:56:45 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:3430 Date: 2006-03-18T07:56:45-05:00 List-Id: Justin Gombos writes: > On 2006-03-17, Robert A Duff wrote: > > Justin Gombos writes: > > > > I'm not sure what the right answer is, but surely all the arguments > > for and against dummy values apply equally to access types. > > I don't agree with that. Null is a standard abnormal object for > access types in all languages, and can never be taken for something > valid. Null is neither "abnormal" nor "invalid" in Ada. As for "all languages", some have a concept of "null" or "nil" or whatever that is the same in this regard. Some languages have no such concept. In Ada, if an object of an access type has no explicit initial value, you can't easily tell whether that means "null is a meaningful value for this variable, and that's the default I want" versus "this variable will be initialized to a meaningful (non-null) value later". This is exactly analogous to the case with integers -- if they were default-initialized to zero, you can't easily tell whether zero is intended as a meaningful initial value, versus later initialization to a meaningful value. - Bob