comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Ada Enumerations
Date: 1997/12/04
Date: 1997-12-04T00:00:00+00:00	[thread overview]
Message-ID: <dewar.881244174@merv> (raw)
In-Reply-To: 3485D2AE.3F54@hso.link.com


Stanley said

<<The functionality of the clause is worth the trade-off of the ugly
name.  Most of the ACT-chosen names for implementation-defined
attributes are depressing (e.g., 'Img, 'Elab_Spec -- ugh.)
>>

Actually it is Ada 83 that clearly established the precedent of using
abbreviations for attributes (Pred, Succ, ...) and Ada 95 continues
the tradition (Max, Min, Trunc, ..) so it seems quite appropriate
to abbreviate. I guess you can't choose names to make everyone happy!

Note that 'Img is very specifically intended for writing quick debugging

code, so it is quite deliberate to give it a very short name, and if you
don't like the name, fine, it should not appear in any of your final
code anyway. After all the ONLY point of Img is to shorten things
(from e.g. Integer'Image (K) to K'Img), so it would be pretty pointless
to give it a long name!

I must say I don't see so much of a problem with Unchecked_Conversion for
replacing Enum_Rep unless you have a really hostile compiler. For types
like this, Unchecked_Conversion should work as expected in cases where
the number of bits of the source and target differs.






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

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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       ` GNAT'Object_Size Mats Weber
1997-12-04  0:00       ` Robert Dewar [this message]
1997-12-04  0:00         ` Ada Enumerations Stanley R. Allen
1997-12-18  0:00           ` Wes Groleau
1997-12-04  0:00       ` GNAT'Object_Size Mats Weber
1997-12-04  0:00       ` GNAT'Object_Size Mats Weber
1997-12-08  0:00         ` GNAT'Object_Size Mats Weber
1997-12-10  0:00           ` GNAT'Object_Size Robert Dewar
1997-12-04  0:00       ` GNAT'Object_Size Mats Weber
1997-12-04  0:00       ` GNAT'Object_Size Mats Weber
1997-12-05  0:00         ` GNAT'Object_Size Mats Weber
1997-12-04  0:00       ` Ada Enumerations 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
1997-12-06  0:00         ` Making Predefined Operators Abstract Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
1997-12-10  0:00 Ada enumerations Stanley R. Allen
1997-12-10  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
1997-12-11  0:00   ` Stanley R. Allen
1997-12-12  0:00     ` Robert Dewar
1997-12-10  0:00 ` John M. Mills
replies disabled

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