Al Sweigart on Nostr: Programmers: Can we talk about how weird it is that the open() function is used both ...
Programmers: Can we talk about how weird it is that the open() function is used both for loading a file and saving a file?
I never thought about it until now, but it's one of those things that makes coding complicated. It also makes us write complicated APIs because we copy these confusing patterns in our own work.
Published at
2024-09-15 15:50:09Event JSON
{
"id": "82aec797bf6fd6feb91fa13c0e2a5a8d90b284208b2198de53223c1561930190",
"pubkey": "89fa96909d343cbebf889f13192e30719623c5102393440d15d51d4b2c08f094",
"created_at": 1726415409,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/AlSweigart/statuses/113142360247959311",
"activitypub"
]
],
"content": "Programmers: Can we talk about how weird it is that the open() function is used both for loading a file and saving a file?\n\nI never thought about it until now, but it's one of those things that makes coding complicated. It also makes us write complicated APIs because we copy these confusing patterns in our own work.",
"sig": "3c219ed3eb3dddd590fbd8e3c47fe7204953ed5fa4c253edb2872e58855c8817c6a1922e87f49d454d9a15ad7dec4a5a5b564c16c784d8cc0c0d7b25f28b62bc"
}