[Openmcl-devel] upcoming 1.6 release

Robert Goldman rpgoldman at sift.info
Tue Oct 12 17:43:04 UTC 2010


On 10/12/10 Oct 12 -12:36 PM, Nikodemus Siivola wrote:
> On 12 October 2010 20:25, R. Matthew Emerson <rme at clozure.com> wrote:
> 
>> It seems pointless to have a function that deletes a directory, but
>> only if it's empty:  usually what one wants is to remove a directory
>> and all its contents.  There seems little use in having something
>> like (delete-directory :recursive-p nil), but maybe there's a reason
>> I haven't thought of.
> 
> Attempting to delete a directory you thought was empty but isn't --
> which typically means that you're either deleting the wrong directory,
> or someone has been putting stuff in there that you're not aware of.
> 
> I think it's a good thing to be able to say "I expect it to be empty"
> -- especially since recursive deletion is inherently racy anyways.
> Unless you're willing to keep trying forever, you still have the
> failure-mode of "someone else was writing into the directory while I
> was trying to delete it".

I'd second this, especially since Unix-heads will have come to expect
refusal to delete non-empty directories as a default.

Also because it's easier to have the "delete only if empty" and supply
the keyword option than to figure out what to do if you don't have the
option at all.

If you feel strongly about your opinion expressed above (it's pointless)
what about keeping :recursive-p, but making it default to T?

best,
r



More information about the Openmcl-devel mailing list