It's pretty hard to know what to do with operating system facilities
like this. The Unix rename function provides certain guarantees that
as far as I know are not available on Windows. For example, Unix
guarantees that if bar already exists, at no point during the rename
will any other process be able to see that bar does not exist. If
some program needs that facility, then it would be an error to
implement os.Rename as MoveFileEx, because we would not be providing
what that program expects.
The best we can do for this kind of thing is fall back on what the
platforms provides, and let portable programs pick up the pieces.
If the Windows maintainers want to change syscall.Rename to use
MoveFileEx, that's fine with me. But it is also fine with me if they
want to leave it as is. I don't see any obvious reason to prefer
either possibility.
Ian