From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Language Lawyer question
Date: 2000/06/02
Date: 2000-06-02T21:09:23+00:00 [thread overview]
Message-ID: <8h97q3$68b$1@hobbes2.crc.com> (raw)
In-Reply-To: 39380CEB.2CC4682E@ftw.rsc.raytheon.com
Wes Groleau <wwgrol@ftw.rsc.raytheon.com> 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?
next prev parent reply other threads:[~2000-06-02 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-02 0:00 Language Lawyer question Wes Groleau
2000-06-02 0:00 ` Paul Graham
2000-06-02 0:00 ` David C. Hoos, Sr. [this message]
2000-06-02 0:00 ` Keith Thompson
2000-06-04 0:00 ` Robert I. Eachus
2000-06-05 0:00 ` Robert A Duff
2000-06-05 0:00 ` Robert Dewar
2000-06-05 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox