From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: procedure Make_File_Gone (Name : in String);
Date: Sat, 23 Jul 2011 10:55:23 -0400
Date: 2011-07-23T10:55:23-04:00 [thread overview]
Message-ID: <wccaac5avxg.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: j0datu$los$1@speranza.aioe.org
tmoran@acm.org writes:
>> I'm of course partial to Purge for this use. :-)
>
> Another verb. Both the phrase Delete_File and the word Purge say "go
> do something" and they leave unclear what to do if you can't do the
> action. I'd like to concisely make clear the post condition I'm trying
> to achieve - in this case, the absence of a file of the given name.
I think you mean precondition. The postcondition of the two is
the same -- the file isn't there.
I think distinguishing Delete_File and Delete would be confusing.
How would you remember which is which?
I'd say Delete_File should raise an exception if the file doesn't
exist, and Maybe_Delete_File should silently do nothing in that case.
> Ideally this should be clear from the procedure name without having
> to look in the ARM or depend on a comment of uncertain modernity.
>
> And yes, there could be a race where someone created a new file of that
> name immediately afterward, but avoiding such races is part of the
> higher level design.
Sure, that's true of pretty-much all file operations.
- Bob
next prev parent reply other threads:[~2011-07-23 14:55 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 [this message]
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
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