comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Question about record rep spec placement
Date: 1997/01/19
Date: 1997-01-19T00:00:00+00:00	[thread overview]
Message-ID: <E48Dsz.5rK@world.std.com> (raw)
In-Reply-To: 32E11C0E.697B@lmtas.lmco.com


In article <32E11C0E.697B@lmtas.lmco.com>,
Ken Garlington  <GarlingtonKE@lmtas.lmco.com> wrote:
>Oh, I thought you were saying you saw many cases where Ada was _less_
>permissive than Ada83, causing upward incompatibilities.

Ada 95 is less permissive in *some* cases, but I claim they are rare in
real programs.  If you can post your code, please do.  And, as I said,
I'll bet that the problem is not an upward incompatibility, but simply a
bug in one or the other of the two 83/95 compilers.  In *most* cases,
the Ada 95 rules are the same as in Ada 83, and in some interesting
cases, more permissive, and in some really weird cases, less permissive.
Surely you agree that my "pragma Priority(R'Size);" example is pretty
weird?

>> It's happened to me more than once.  But it doesn't happen a LOT.
>
>Then a style rule suggesting the placement of rep specs in the private
>area shouldn't usually cause problems, and where it does, a comment
>should suffice.

Yeah, that's a reasonable attitude.  It's just that I run into these
problems from time to time (e.g. the generic example I gave in my
earlier posting), and so I've decided that it's best to give up, and put
the rep clause right after the type.  Nonetheless, I agree with your
*sentiment* -- that rep clauses are often private information.  I agree
that your style is reasonable, given that "a comment should suffice".

I must say, that this sort of thing is what gives Ada a bad name, as
being "too complex".  And it's true -- the freezing rules (and the
forcing occurrence rules of Ada 83) are, indeed, too complex.  I'll eat
my hat, if you can show me one professional Ada programmer who knows all
the freezing/forcing rules!  ;-)  I (who wrote them) must look them up
each time somebody asks a question -- I can't remember them off the top
of my head.

- Bob




  reply	other threads:[~1997-01-19  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-15  0:00 Question about record rep spec placement Ken Garlington
1997-01-15  0:00 ` Bob Gilbert
1997-01-16  0:00   ` Fergus Henderson
1997-01-17  0:00   ` Ken Garlington
1997-01-17  0:00     ` Bob Gilbert
1997-01-17  0:00       ` Robert A Duff
1997-01-17  0:00         ` Ken Garlington
1997-01-18  0:00           ` Robert A Duff
1997-01-18  0:00             ` Ken Garlington
1997-01-19  0:00               ` Robert A Duff [this message]
1997-01-21  0:00         ` Bob Gilbert
1997-01-22  0:00           ` Ken Garlington
1997-01-23  0:00             ` Art Schwarz
1997-01-25  0:00               ` Ken Garlington
1997-01-24  0:00             ` Bob Gilbert
1997-01-25  0:00               ` Ken Garlington
1997-01-20  0:00       ` Ken Garlington
1997-01-15  0:00 ` Norman H. Cohen
1997-01-16  0:00   ` Ken Garlington
1997-01-17  0:00     ` Robert A Duff
1997-01-18  0:00       ` Ken Garlington
1997-01-16  0:00 ` Jeff Creem
1997-01-16  0:00 ` Jerome Desquilbet
replies disabled

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