From: Simon Wright <simon@pushface.org>
Subject: Re: procedure Make_File_Gone (Name : in String);
Date: Mon, 25 Jul 2011 18:28:05 +0100
Date: 2011-07-25T18:28:05+01:00 [thread overview]
Message-ID: <m2sjpuxobe.fsf@pushface.org> (raw)
In-Reply-To: d85d5f62-76fa-4efb-8dc1-6da95d1df7fd@t8g2000prm.googlegroups.com
Adam Beneschan <adam@irvine.com> writes:
> On Jul 23, 2:08 pm, Simon Wright <si...@pushface.org> wrote:
>> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> writes:
>>
>> > On Sat, 23 Jul 2011 19:05:02 +0000 (UTC), tmo...@acm.org wrote:
>>
>> >> I'm looking for a good name for such a routine, where "good" means
>> >> short and clear to a maintenance programmer scanning the code. Perhaps
>> >> English doesn't have a nice way of making such an imperative->declarative
>> >> phrase.
>>
>> > procedure Delete_File (File : String; Existing : Boolean := True);
>>
>> procedure Delete_File (File : String;
>> Only_If_Existing : Boolean := True);
>
> Or you could go the other way:
>
> procedure Delete_File (File : String;
> OK_If_File_Doesnt_Exist : Boolean := False);
>
> The parameter name is clunky. Still, I think I'd slightly prefer
> something along those lines because I tried to read a call that looks
> like this:
>
> Delete_File (F, Only_If_Existing => False);
>
> I'd be scratching my head trying to figure out what it meant. It's
> probably better to use names that mean nothing:
>
> Delete_File (F, Glarfspoogl => False);
>
> than to use names that look like they're intended to convey meaning
> but actually are just confusing. The former at least will force
> readers to go back and look at the documentation. (I'm only half-
> serious here. I don't recommending using ridiculous names like
> Glarfspoogl.)
I take your point.
With_Exception_If_Not_Found : Boolean := True
(we could argue this one for a long time if we had nothing better to
do!)
next prev parent reply other threads:[~2011-07-25 17:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 6:04 procedure Make_File_Gone (Name : in String); tmoran
2011-07-20 7:03 ` Oliver Kleinke
2011-07-20 7:12 ` Niklas Holsti
2011-07-20 7:34 ` Martin
2011-07-20 18:02 ` Jeffrey Carter
2011-07-21 7:56 ` Stephen Leake
2011-07-22 23:44 ` Randy Brukardt
2011-07-23 2:16 ` tmoran
2011-07-23 14:55 ` Robert A Duff
2011-07-23 19:05 ` tmoran
2011-07-23 20:23 ` Dmitry A. Kazakov
2011-07-23 21:08 ` Simon Wright
2011-07-25 15:49 ` Adam Beneschan
2011-07-25 17:28 ` Simon Wright [this message]
2011-07-25 17:44 ` marius63
2011-07-27 15:38 ` tmoran
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox