From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: Design problem: generic package vs tagged subtype
Date: Thu, 01 Jul 2010 11:30:58 -0700
Date: 2010-07-01T11:30:58-07:00 [thread overview]
Message-ID: <i0in2n$ghs$1@tornado.tornevall.net> (raw)
In-Reply-To: <m2oceryca6.fsf@pushface.org>
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
next prev parent reply other threads:[~2010-07-01 18:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 17:52 Design problem: generic package vs tagged subtype Marek Janukowicz
2010-06-30 19:23 ` Simon Wright
2010-06-30 22:33 ` Marek Janukowicz
2010-07-01 4:13 ` naming, was " tmoran
2010-07-01 9:49 ` J-P. Rosen
2010-07-01 15:48 ` Marcelo Coraça de Freitas
2010-07-01 5:57 ` Simon Wright
2010-07-01 18:30 ` Jeffrey R. Carter [this message]
2010-07-01 19:28 ` Simon Wright
2010-07-01 19:59 ` Jeffrey R. Carter
2010-07-01 21:14 ` Per Sandberg
2010-07-02 9:25 ` Stephen Leake
2010-07-02 10:50 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox