comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Ada enumerations
Date: 1997/12/10
Date: 1997-12-10T00:00:00+00:00	[thread overview]
Message-ID: <dewar.881792609@merv> (raw)
In-Reply-To: 348EDDC9.794B@hso.link.com


<<'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 :-)





  parent reply	other threads:[~1997-12-10  0:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-10  0:00 Ada enumerations Stanley R. Allen
1997-12-10  0:00 ` John M. Mills
1997-12-10  0:00 ` Robert Dewar [this message]
1997-12-11  0:00   ` Stanley R. Allen
1997-12-12  0:00     ` Robert Dewar
1997-12-11  0:00   ` Mats Weber
1997-12-11  0:00     ` Robert Dewar
1997-12-12  0:00       ` Mats Weber
1997-12-12  0:00         ` Robert Dewar
1997-12-12  0:00     ` Samuel T. Harris
  -- strict thread matches above, loose matches on Subject: below --
1997-12-03  0:00 Ada Enumerations Jeffrey Harris
1997-12-03  0:00 ` James S. Rogers
1997-12-03  0:00   ` Robert Dewar
1997-12-03  0:00     ` Stanley R. Allen
1997-12-04  0:00       ` Robert Dewar
1997-12-04  0:00         ` Stanley R. Allen
1997-12-18  0:00           ` Wes Groleau
1997-12-04  0:00       ` Matthew Heaney
1997-12-04  0:00         ` Stanley R. Allen
1997-12-07  0:00           ` Keith Thompson
1997-12-07  0:00             ` Matthew Heaney
1997-12-07  0:00             ` Robert Dewar
1997-12-08  0:00               ` Keith Thompson
1997-12-07  0:00                 ` Matthew Heaney
1997-12-11  0:00                   ` John G. Volan
1997-12-04  0:00 ` Stephen Leake
1997-12-04  0:00   ` Matthew Heaney
1997-12-04  0:00     ` Robert Dewar
1997-12-06  0:00       ` Jean-Pierre Rosen
replies disabled

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