comp.lang.ada
 help / color / mirror / Atom feed
From: dgibson@thalamus.cis.ohio-state.edu (david scott gibson)
Subject: Re: Q: on redefinition of equal
Date: 1996/04/04
Date: 1996-04-04T00:00:00+00:00	[thread overview]
Message-ID: <4k131kINN2ac@thalamus.cis.ohio-state.edu> (raw)
In-Reply-To: 9604031559.AA05644@most

In article <9604031559.AA05644@most>,
W. Wesley Groleau (Wes) <wwgrol@PSESERV3.FW.HAC.COM> wrote:
>I don't know how inescapable is your "requirement" to hide predefined "="
>from "ALL" data types.  But here's something to consider:
>
>How much will it cost over the life cycle to have maintenance programmers
>
>replacing
>
>   if (A = B) = True then
>
>with
>
>   if A = B then
>
>only to (attempt to) compile and then change it back?

Well, of course, this is only one of the problems with such a
strategy.  BTW, I consider

    if Is_True(A = B) then 

preferable to using two different ='s since appears a little less
confusing.  Note that I'm only exploring possibilities at this point!

>Of course, with GNAT you can change the compiler to accept the standard
>form with your new type Bool  :-)

If I wanted to modify the compiler, all I'd need to do is change the
Normalize_Scalars pragma to initialize all scalars with valid
representations.  Then I could use the built-in scalars directly with
the aid of the modified, but still legal, pragma.  (Of course, such a
modification directly contradicts the implementation advice.)

--
Dave
dgibson@cis.ohio-state.edu

















  reply	other threads:[~1996-04-04  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-03  0:00 Q: on redefinition of equal W. Wesley Groleau (Wes)
1996-04-04  0:00 ` david scott gibson [this message]
1996-04-05  0:00   ` Brad Balfour
1996-04-05  0:00     ` david scott gibson
1996-04-05  0:00   ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox