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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-11 11:10:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!POSTED.monger.newsread.com!not-for-mail From: William C. Brennan MIME-Version: 1.0 User-Agent: Hogwasher/2.6.1 (Macintosh) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <01HW.B902D67F000816480DFC0B90@netnews.netaxs.com> Subject: Re: Announce: Grace project site operational Newsgroups: comp.lang.ada References: <3CD88FBD.4070706@telepath.com> <3CD91E31.1060004@telepath.com> <3CD94E63.3050607@mail.com> Date: Sat, 11 May 2002 18:10:30 GMT NNTP-Posting-Host: 207.8.207.52 X-Complaints-To: Abuse Role , We Care X-Trace: monger.newsread.com 1021140630 207.8.207.52 (Sat, 11 May 2002 14:10:30 EDT) NNTP-Posting-Date: Sat, 11 May 2002 14:10:30 EDT Organization: NetAXS, LLC (netnews.netaxs.com) Xref: archiver1.google.com comp.lang.ada:23903 Date: 2002-05-11T18:10:30+00:00 List-Id: On Wed, 8 May 2002 12:31:44 -0400, Larry Kilgallen wrote (in message ): > In article <3CD94E63.3050607@mail.com>, Hyman Rosen > writes: > > And as an Ada programmer, I thank you for that diligence. > I have a lot of "count" types in a program I am working on > currently, and I would appreciate it if packages provided > that, in the spirit of Ada. > For my own personal preference, I have to weigh in with Larry here. In the "spirit of Ada" (oh, it feels good to wrap one's self in the flag ;-)) I use a unique type for whatever I'm counting: electrons, meters, apple-pushcarts, apples, or "items". In fact, it still disappoints me (slightly) that the Ada 83 language team failed to create String indexed by its own Character_Index type. I'm a little surprised to hear, at least as sampled in this tiny forum, that so many Ada fans are quick to give up the same benefits for counting objects as they are for counting things with more traditionally defined units. It has always given me a nice fuzzy feeling that I know I can't accidentally substitue number_of_apple_ carts for number_of_apples in exactly the same way I feel secure that I can't subsititute seconds for hours. It never felt like "overkill" to me, and I don't think this philosophy leads to an explosion of unique types. Using Integer (and its sisters Natural and Positive) just absolutely reeks of C's int, and I avoid it whenever I can. Of course, I use Strings, so I can't avoid it as much as I would like. ;-) It's my style - no not just mine... it's the Ada style. ;-) (So have I shamed the rest of you into it yet?) So, anyway, it would be nice if the container packages didn't force me to use Natural to count my apple_carts when I don't wouldn't use this type myself. It would be a *small* inconvenience to specify the counting type as the actual generic parameter. -- Bill Brennan brennan@netaxs.com