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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,7a2d45f282a1da1c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-04 20:44:46 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: float with 24-bit resolution Date: Thu, 4 Sep 2003 22:46:45 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3F3CCB0F.543478AF@adrianhoe.nospam.com.my> <3f405ef4$1_1@news.tm.net.my> <3f54bf19_1@news.tm.net.my> <6u27jb.6e.ln@skymaster> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:42160 Date: 2003-09-04T22:46:45-05:00 List-Id: "Jean-Pierre Rosen" wrote in message news:6u27jb.6e.ln@skymaster... > > "Randy Brukardt" a �crit dans le message de news:vld62odqnfei2d@corp.supernews.com... > > > Matthew Heaney writes: > > > > > > > Null_Object : T := null; > > > > > > > I find the latter convention confusing, because it suggests that if > > > > the initialization part were omitted, then the object wouldn't be > > > > initialized. But that would be incorrect. > > > > *I* find > > Null_Object : T; > > confusing. A maintenance programmer probably doesn't know the class of > > object that T represents, > > I understand that concern, but it vanishes with reasonable identifiers: > > Null_Object : String_Pointer; > > OK for you? Not really, unless your organization has very strong naming conventions. (We don't; I tried to enforce some naming conventions with Claw, but that was only partially successful.) Certainly, I have some "virtual pointer" types that are really integers or private types, and these need to be initialized. (Even if a private type is implemented as an access type, you still ought to explicitly initialize it, because otherwise you're depending on the private definition, which may change.) If Ada had a way to specify a default value for a (sub)type, I would be happy to omit the initializer. (Or if flow shows that it is certain to be initialized.) But, given the current language, that is often not a good idea. Randy.