From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 18 Sep 92 17:54:23 GMT From: seas.gwu.edu!mfeldman@uunet.uu.net (Michael Feldman) Subject: Re: Enumerations Message-ID: <1992Sep18.175423.25826@seas.gwu.edu> List-Id: 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