@mort
It's an accident of history, really.
The whole idea of atomically updating critical files so that a running system never sees them in a partly written state only really took hold in the 1990s.
Whereas editing configuration files with text editors that truncated and rewrote in place was theretofore generally the norm, and one had to have extra tools like vipw to make atomicity guarantees.
C standard libraries had stabilized the decade before. And the C++ libraries effectively took the C libraries as templates for what functionality to offer.
The rather sad part of this is that Microsoft had System.IO.File::Replace() in the .NET library, based upon the ReplaceFile() Win32 function, years ago.
https://learn.microsoft.com/en-gb/dotnet/api/system.io.file.replace
https://learn.microsoft.com/en-gb/windows/win32/api/winbase/nf-winbase-replacefilew
#CLanguage #Unix #ComputerHistory #CPlusPlus #DotNet #Win32 #Unix