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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae5e339df4dff313 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Language Lawyer question Date: 2000/06/02 Message-ID: <8h97q3$68b$1@hobbes2.crc.com>#1/1 X-Deja-AN: 630373327 References: <39380CEB.2CC4682E@ftw.rsc.raytheon.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@crc.com X-Trace: hobbes2.crc.com 959980163 6411 198.175.145.56 (2 Jun 2000 21:09:23 GMT) Organization: CRC: A wholly owned subsidiary of Thermo Electron X-MSMail-Priority: Normal NNTP-Posting-Date: 2 Jun 2000 21:09:23 GMT Newsgroups: comp.lang.ada Date: 2000-06-02T21:09:23+00:00 List-Id: Wes Groleau wrote in message news:39380CEB.2CC4682E@ftw.rsc.raytheon.com... > One of my coworkers just asked an interesting question: > > Why do we have to write > > Some_Type'Pred (Some_Value) > > when > > Some_Value'Pred > > is more natural/intuitive and > carries just as much type info? > > I pointed out that there is no type info in a literal (like > Orange'Pred) but he said that the type info would be somewhere > else in the statement. I could not quickly come up with a > counter-example. Plus, how often would we use a literal as > parameter to 'Pred ? Might as well just use the literal value > of the Predecessor. > What is 0'Pred? 1. Illegal if Natural 2. -1 if Integer 3, 2 ** modulus - 1 if modular Now if you meant Some_Object'Pred -- that's possible But, how would you do the equivalent of Modular_Type'Pred (0) with your syntax?