in reply to Re: A DWIM too far?
in thread A DWIM too far?

I'm not sure which I find the most bizarre

  1. That the silently destructive behaviour was ever adopted in the first place.
  2. That such a (IMO) flawed behaviour should have been perpectuated.
  3. Or the outpouring of support for it.

As is, the behaviour makes it impossible to safely rename a file.

You can test existance before issuing the rename, but in any multi-tasking environment there is always the possibility that the target file will be created between the test for existance and the rename. This renders the the often hard won (and IMO, sacrosanct) atomicity of the OS rename API useless.

This rates up there with non-exlusive-opens-by-default and cooperative locking as remnant bahaviours of a bygone era that should have been superceded long ago.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon