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,45a9122ddf5fcf5 X-Google-Attributes: gid103376,public From: Ken Garlington Subject: Re: Valid Attribute and Unchecked Conversion Date: 1996/10/07 Message-ID: <3258EADB.45D2@lmtas.lmco.com>#1/1 X-Deja-AN: 187405647 references: content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Macintosh; I; 68K) Date: 1996-10-07T00:00:00+00:00 List-Id: Robert A Duff wrote: > > In article , Keith Thompson wrote: > >Are sparse enumeration types are really used all that much in real life? > > They shouldn't be, because, as you explained, they don't work. Using > sparse enums is asking for erroneousness. > > Well, it's not *quite* that bad: You can use a sparse enum for sending > data from Ada to the outside world (e.g. doing output, passing > parameters *to* an imported subprogram, unchecked converting *from* a > sparse enum, etc). But the other direction doesn't always work, and > should be avoided, IMHO. Or, you can do an unchecked conversion to a record with a single component of the sparse enum type, right? > The whole feature causes an awful lot of complexity in compilers, > given that it's not very useful. Sigh. > > - Bob -- LMTAS - "Our Brand Means Quality" For more info, see http://www.lmtas.com or http://www.lmco.com