3 ms·
I wouldn't exactly call POSIX file i/o semantics wrong: POSIX came after the systems that it was trying to document, so it wasn't in a position to propose new s
by bcrl 6y ago
I wouldn't exactly call POSIX file i/o semantics wrong: POSIX came after the systems that it was trying to document, so it wasn't in a position to propose new semantics. That has always been the problem with advanced filesystem APIs. Without new advanced APIs being available on all major platforms, developers fall back to the lowest common denominator across the platforms they are trying to support. And it's difficult to try to change these semantics once systems are in place.
It is also important to note that complex semantics make building high performance systems much more difficult. Nobody in their right mind would use POSIX locks in a high performance application. More complex APIs often have implicit locking requirements which defeat the efforts made to improve scalability on multi-core systems over the past decades of system development.
Systems development is all about trade-offs, and complexity constraints choices in often unexpected ways.