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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,dd41b5654bd378e7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Representation item appears too late References: <87640vgvvl.fsf@ludovic-brenta.org> <47216832.54B2@earthlink.net> Date: Fri, 26 Oct 2007 10:34:36 +0200 Message-ID: <87lk9qff4z.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:mfQKWMI76uJSPQ19B9jyA7yVViQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=a_M`aB3Ode@`QNUjPKOELC6`Y6aWje^YJ6`[cc]8_=4DdV@@j^iAY;2O5HAhGYP34N]PeG Xref: g2news2.google.com comp.lang.ada:2573 Date: 2007-10-26T10:34:36+02:00 List-Id: Vincent Marciante writes: > How about: > > package A is > > type Size is (Small, Large); > > type Foo is range 1 .. 8; > > package Base is > type T is record [...] > end record; > end Base; > > type T is new Base.T; > > procedure P (X : in T); -- a null procedure for the sake of example > > end A; Yes, that makes P not primitive but it introduces two unnecessary entities (Base and Base.T) in the spec of A and clutters it. Not only that but I'd also have to add comments explaining why I do things that way: so that I can add a rep clause in an unrelated package. As I said, I think this would be even uglier than adding the rep clause directly in A. -- Ludovic Brenta.