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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,227757d168eaa8a5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-east.rr.com!news.rr.com!news-server.columbus.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: A question re meaning/use of the "for ... use ..." References: <41b3291e$0$44072$5fc3050@dreader2.news.tiscali.nl> From: Keith Thompson Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:W8HNh2RPKFWEaCsEwyExxW7r9Vg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 10 Dec 2004 21:18:06 GMT NNTP-Posting-Host: 66.91.240.168 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1102713486 66.91.240.168 (Fri, 10 Dec 2004 13:18:06 PST) NNTP-Posting-Date: Fri, 10 Dec 2004 13:18:06 PST Organization: RoadRunner - West Xref: g2news1.google.com comp.lang.ada:6887 Date: 2004-12-10T21:18:06+00:00 List-Id: [...] > But this whole issue comes from people trying to use enumeration > representations for purposes for which they are not intended. They're only > intended to be used for *external* representations, which means that the > program itself has no reason to be concerned with them. The program should > use the internal representation. [...] People use things for purposes for which they are not intended all the time. Ada quite properly makes it easiest to use things in the way they're intended, but in this case, in my opinion, it goes too far in preventing the programmer from doing certain things. The 'Pos and 'Val attributes deal with the position number, and for loops iterate over the defined values. That's fine. But why make the programmer jump through so many hoops to deal with the representation values? The fact that GNAT has the 'Enum_Rep attribute is evidence (but not proof) that there's a need for this kind of thing. I've implemented enumeration representation clauses, but I've never found them to be useful. -- Keith Thompson (The_Other_Keith) kst-u@mib.org San Diego Supercomputer Center <*> We must do something. This is something. Therefore, we must do this.