comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Representation item appears too late
Date: Fri, 26 Oct 2007 10:34:36 +0200
Date: 2007-10-26T10:34:36+02:00	[thread overview]
Message-ID: <87lk9qff4z.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 47216832.54B2@earthlink.net

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.



      reply	other threads:[~2007-10-26  8:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 13:35 Representation item appears too late Ludovic Brenta
2007-10-25 13:46 ` Lucretia
2007-10-25 15:41 ` Adam Beneschan
2007-10-25 18:37   ` Ludovic Brenta
2007-10-26  4:08 ` Vincent Marciante
2007-10-26  8:34   ` Ludovic Brenta [this message]
replies disabled

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