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-Thread: 103376,ab43ecf7e1a10743 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!freenix!nnx.oleane.net!oleane!skymaster!nobody From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Zero_Fill pragma Date: Tue, 20 Jul 2004 19:37:18 +0200 Organization: Adalog Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1090346543 6827 195.25.228.57 (20 Jul 2004 18:02:24 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 20 Jul 2004 18:02:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Xref: g2news1.google.com comp.lang.ada:2283 Date: 2004-07-20T19:37:18+02:00 List-Id: "Nick Roberts" a �crit dans le message de news:opsbf2fpb0p4pfvb@bram-2... > Am I too late to make a proposal for a new pragma for > the Ada 2005 Amendment? Yes > It would have the syntax: > > pragma Zero_Fill(simple_name); >[...] > Either way, I think the pragma would be useful in real > programs, I would not think so. 1) There is nothing special with the value 0 in Ada. You can have (easily) types where value 0 does not belong to the type, therefore 0 would not be better than any random value. 2) An uninitialized variable is a bug. This would help hiding bugs, not finding them. 3) Because of 2), there is already pragma Initialize_Scalars, which purposedly initializes all scalars to an *invalid* value (if possible). Therefore, you'll get Constraint_Error during the first tests, not in production use. Much better. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr