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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca9eef4d5e2078ea X-Google-Attributes: gid103376,public From: Charles Hixson Subject: Re: Beware: Rep spec on an enumeration type causes code explosion Date: 1997/12/10 Message-ID: <348EC4FA.26042E34@earthling.net>#1/1 X-Deja-AN: 296965279 References: Organization: Zippo News Service [http://www.zippo.com] Newsgroups: comp.lang.ada Date: 1997-12-10T00:00:00+00:00 List-Id: This may be so, and I'm not replying exactly to your point, but there are many uses for disjoint ranges (e.g. [7..15, 23, 37, 128..255]), and I think that THEY should be a part of the language. (P.S.: I am a total novice at Ada, so maybe they already are, and I just haven't found out about them). Matthew Heaney wrote: > > In article , > stt@houdini.camb.inmet.com (Tucker Taft) wrote: > > >So in retrospect, I believe enumeration representation > >clauses in Ada are a mistake. If a user wants to name > >particular values, they should simply use named integer > >constants, or perhaps better, named private-type constants. They can build > >up various maps of their own if they want to translate to/from some kind > >of "holey" representation from/to a contiguous representation. > > Hallelujah! I've always thought the same thing. If you want to read data > off an external interface, then just read it into an integer, and convert > it to an enumeration value yourself. Look Ma, no validity problems! And > no hidden inefficiencies. And no compiler complexity. And so on... > > -------------------------------------------------------------------- > Matthew Heaney > Software Development Consultant > > (818) 985-1271 -- Charles Hixson charleshixson@earthling.net (510) 464-7733 or chixso@mtc.dst.ca.us