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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71dcb452eafb5045 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Ada enumerations Date: 1997/12/10 Message-ID: #1/1 X-Deja-AN: 297048027 References: <348EDDC9.794B@hso.link.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 881793104 9819 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1997-12-10T00:00:00+00:00 List-Id: <<'Representation (or 'Enum_Rep in GNAT) is based on these factors. At the risk of seeming shrill, I'll repeat myself: what good reason can there be for allowing me to *specify* enumeration representations but denying me the ability to easily *query* them also? >> There are actually other cases of being able to specify things without being able to query them. For example, there is no 'Packed attribute to see if a type is packed. However, there clearly is a general attempt to provide this kind of symmetry. The bottom line here is simple. This is a feature that it is well known is wanted by a small minority of the Ada community. This is not a criterion for putting things in the language (there are thousands of other such features). This particular feature was requested in one of the revision requests, carefully discussed, and specifically rejected. I see no new information in this discussion that would warrant a reconsideration of the decision. Yes, we have an instance of someone who wants it. We also have an instance of someone else who thinks it is unnecessary. Nothing new there .... My own feeling is that unchecked conversion is adequate. In practice it should work fine in any reasonable compiler to just do a conversion to the largest unsigned type, even if the sizes do not match (I can't imah=gine a compiler not doing the "right" thing there). We put in Enum_Rep because one of our customers really wanted it, and it was easy to do, but you should realize tha a lot of people complain at us for implementing such "extensions" to the language, so there is always a delicate balance here! Robert Dewar Ada Core Technologies P.S. I would be surprised if you could not persuade other vendors to put this attribute in. If not, and if you absolutely must have it, then I guess you will have to use GNAT :-)