3 ms·
The original C/POSIX API this is based on is non-orthogonal because the combinations it doesn't support generally don't make sense. There's usually no point ope
by makomk 4y ago
The original C/POSIX API this is based on is non-orthogonal because the combinations it doesn't support generally don't make sense. There's usually no point opening files for reading or in append mode if you're truncating the existing contents anyway, and not truncating when opening in write-only mode is almost always wrong because any existing contents that aren't overwritten are almost certainly not relevant to the new contents and shouldn't be there (because the app clearly isn't payint attention to what was already there).
- lupire 4y agoThat's not true because fdopen has different behavior from fopen, so it's a subtle poor choice that goes back to the beginning.