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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9e499c74312ed3f0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-18 09:43:33 PST Newsgroups: comp.lang.ada Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!netnews.com!feed2.onemain.com!feed1.onemain.com!uunet!dca.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: Static assertions X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3B054ABE.9B3DA459@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: Mime-Version: 1.0 Date: Fri, 18 May 2001 16:15:58 GMT X-Mailer: Mozilla 4.5 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.sj.google.com comp.lang.ada:7637 Date: 2001-05-18T16:15:58+00:00 List-Id: Robert A Duff wrote: > > What I meant was that it's better style to use a qualfied expression > than a type conversion, in cases where both work, because a qual exp is > less powerful. That is, why say "Warning Will Robinson: I'm converting > types" when you're *not* converting types? Isn't that "Danger, Will Robinson"? I certainly agree with this advice. One thing that always stopped me short in my tracks was code with constructs such ... + My_Type (3) - ... apparently written by people who thought that "3" has type Integer (or perhaps used a compiler with that "feature"). However, is there any reason to write Assert_1 : constant := Boolean'Pos (Assert'(Integer'Size = 73) ); rather than Assert_1 : constant Assert := Integer'Size = 73; ? Are there compilers that won't check this during compilation? -- Jeffrey Carter