this post was submitted on 22 Mar 2024
5 points (100.0% liked)

linuxmemes

20408 readers
961 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
5
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 

Though the Windows thing was really funny ๐Ÿ˜‚.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 6 months ago (1 children)

the linux-file-deletion is used as a example for good software design. It has a very simple interface with little room for error while doing exactly what the caller intended.

In John Ousterhout's "software design philosophy" a chapter is called "define errors out of existence". In windows "delete" is defined as "the file is gone from the HDD". So it must wait for all processes to release that file. In Linux "unlink" is defined as "the file can't be accessed anymore". So the file is gone from the filesystem immediately and existing file-handles from other processes will life on.

The trade-off here is: "more errors for the caller of delete" vs "more errors due to filehandles to dead files". And as it turns out, the former creates issues for both developers and for users, while the later creates virtually no errors in practice.

[โ€“] [email protected] 1 points 6 months ago

doing exactly what the caller intended.

No, no. Exactly what the user told it to do. Not what they intended. There's a difference.