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,c31acc89d296bc62 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!news.tornevall.net!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Design problem: generic package vs tagged subtype Date: Thu, 01 Jul 2010 11:30:58 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: NNTP-Posting-Host: 105cf446c14ff31ff92cd6842aab996d Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 4540b531068c9daa4af3cdc743d590b9 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-Validate-Post: http://news.tornevall.net/validate.php?trace=4540b531068c9daa4af3cdc743d590b9 X-SpeedUI: 1738 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news1.google.com comp.lang.ada:12104 Date: 2010-07-01T11:30:58-07:00 List-Id: On 06/30/2010 10:57 PM, Simon Wright wrote: > > Use context -- I'd much rather write > procedure Send (M : Message); > than > procedure Send (The_Message : Message); > or, much worse, > procedure Send (Message_To_Send : Message); I don't really care which of these I write. But I'd much rather READ Send (Message => ...); than Send (M => ...); -- Meaningless or Send (The_Message => ...); -- Prefixes decrease readability or Send (Message_To_Send => ...); -- "much worse" so I'd probably write procedure Send (Message : in Message_Info); or something like that. More importantly, I'd decide that I want to read "Message" as the formal parameter name 1st, and from there decide on my type name. I understand that this requires thinking before coding, and so will never be popular. -- Jeff Carter "My dear Mrs. Hemoglobin, when I first saw you, I was so enamored with your beauty I ran to the basket, jumped in, went down to the city, and bought myself a wedding outfit." Never Give a Sucker an Even Break 111