comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re: Enumerations
Date: 18 Sep 92 17:54:23 GMT	[thread overview]
Message-ID: <1992Sep18.175423.25826@seas.gwu.edu> (raw)

In article <1992Sep18.154145.6086@wdl.loral.com> mab@wdl39.wdl.loral.com (Mark 
A Biggar) writes:
[ stuff deleted]

>identity is still true.  In fact, the only way to determine what bit values
>are being used for a given enumeration literal is to use UNCHECKED_CONVERSION
>to translate to a suitable integer type.  Now as a Quality Of Implementation
>issue I would expect that most Ada compilers, in the absense of a rep spec,
>do store the value E'POS(X) for enumeration literal X, but the LRM does not
>require it.  I also do not believe that Ada9x gives any relief in this area.

Your use of the word "relief" suggests that you think something is broken
here. What's wrong with this? Ada - as a matter of design philosophy -
tries to separate abstraction from implementation. You write down a sequence
of enumeration literals; 99.9% of the time you could not care less what the
corresponding bits are. For the 0.1% of the time when you do care (oh, OK,
so maybe it's a few percent), you use repspecs. This is bad? What's
wrong with the implementer choosing an easy set of _default_ reps as
long as your repspec override is obeyed faithfully?

Mike Feldman

             reply	other threads:[~1992-09-18 17:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-09-18 17:54 Michael Feldman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-09-22 14:27 Enumerations Chris Elliott
1992-09-20 22:32 Enumerations Gary Morris @pulsar
1992-09-19  2:31 Enumerations Michael Feldman
1992-09-19  1:18 Enumerations Mark A Biggar
1992-09-19  0:40 Enumerations John Goodenough
1992-09-18 15:41 Enumerations Mark A Biggar
1992-09-18  1:39 Enumerations Michael Feldman
1992-09-17 23:40 Enumerations Kevin Simonson
1992-09-17 22:26 Enumerations Darren Davenport 283-4173
1992-09-17 21:20 Enumerations david.c.willett
replies disabled

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