$ ./guess_the_languageGame Dev
Game Dev · hard · #178

Why write saves atomically?

  1. A crash could truncate
  2. Disks reorder the bytes
  3. Compression needs it
  4. Checksums demand it
Writing to a temp file then renaming means an interrupted save never corrupts the old one.
Play Game Dev ▸