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,e977cd3ab4e49fef X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Question about record rep spec placement Date: 1997/01/19 Message-ID: #1/1 X-Deja-AN: 210740776 references: <32DF9F55.7EA3@lmtas.lmco.com> <32E02DB1.6E06@lmtas.lmco.com> <32E11C0E.697B@lmtas.lmco.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1997-01-19T00:00:00+00:00 List-Id: In article <32E11C0E.697B@lmtas.lmco.com>, Ken Garlington 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