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: a07f3367d7,25d835bb9a4a003f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!feeder.erje.net!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Types, packages & objects : the good old naming conventions question (without religious ware) Date: Thu, 29 Oct 2009 22:08:37 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <4ae9dade$0$6551$9b4e6d93@newsspool4.arcor-online.net> <561e0a4a-c6c0-42db-9f31-a70f4eae1ed9@a21g2000yqc.googlegroups.com> NNTP-Posting-Host: e497c1d863cabbe54ee59e7bf29fe34b Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: bcb66920058e803eaaaad4d278381baf X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <561e0a4a-c6c0-42db-9f31-a70f4eae1ed9@a21g2000yqc.googlegroups.com> X-Validate-Post: http://news.tornevall.net/validate.php?trace=bcb66920058e803eaaaad4d278381baf X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news2.google.com comp.lang.ada:8873 Date: 2009-10-29T22:08:37-07:00 List-Id: Hibou57 (Yannick Duch�ne) wrote: > > An example trap (to me at least) : what about a type which would seems > obviously named Size and a parameter which seems obviously named > Size ? X would surely not be OK, neither Item. If Size is the best name for the parameter, and assuming this a numeric value, then I'd call the type Size_Value. > An idea may be to get a more or less close synonymous (like Count... > not very good) for the parameter for which one may naturally be > tempted to name Size. But this seems (and is) a work-around, and if > the word � work-around � really legitimately applies on that > situation, this means there is a trouble (not natural, at least). Why > the work around will probably applied on the parameter ? Because the > parameter comes later when the type definition is already introduced > (in the worst case, it may be tempting to change the type name). This > latter detail makes us to come to another aspect of the trouble : > choosing a practicable type name, may requires an amount of prediction > over what instance names may be. I think that you shouldn't be writing anything until you've decided on the type and its operations, including their parameters. This isn't trouble. A type is usually only part of what you're creating, and it's important to think about the whole thing before committing any part of it to code. This is especially true for the visible part of a pkg spec. -- Jeff Carter "C's solution to this [variable-sized array parameters] has real problems, and people who are complaining about safety definitely have a point." Dennis Ritchie 25