Re: Default rep specs for record types - documented??
- From: Anonymous Coward <bogus_addy@xxxxxxxxxxxxxxxx>
- Date: Fri, 04 Nov 2005 04:11:18 GMT
In article <meKdnXXIJd6tVPfeRVn-vw@xxxxxxxxxxx>, Steve wrote:
>
> Look in the Ada 95 LRM section 13, Representation Issues
>
> Section 13.1 paragraph 19
>
> If an aspect of representation of an entity is not specified, it is
> chosen by default in an unspecified manner.
>
> So... if it matters, use a representation clause.
Thanks for the feedback. Essentially what that is saying is that
there are no guarantees for what to expect from a default
representation. It bothers me to read this, because it counters my
understanding - and counters what Cohen has written in ADA as a Second
Language.
Example: Cohen states that enumerated types are guaranteed to have a
representation that numbers the first element as zero, and increases
sequentially. Is this not really guaranteed?
What's disappointing is that rep specs add considerable clutter.
Readable code avoids redundancy, so having default representation
aspects that are guaranteed enable less noisey code. I'm not looking
forward to rep specing records bit for bit simply to enforce the same
order of elements that's specified in the operation specs.
.
- Follow-Ups:
- Re: Default rep specs for record types - documented??
- From: Stephen Leake
- Re: Default rep specs for record types - documented??
- From: Jeffrey R. Carter
- Re: Default rep specs for record types - documented??
- References:
- Default rep specs for record types - documented??
- From: Anonymous Coward
- Re: Default rep specs for record types - documented??
- From: Steve
- Default rep specs for record types - documented??
- Prev by Date: Re: Discriminated types with default discriminants
- Next by Date: Re: I don't know what the compiler wants to tell me
- Previous by thread: Re: Default rep specs for record types - documented??
- Next by thread: Re: Default rep specs for record types - documented??
- Index(es):
Relevant Pages
|