3 ms·
> You might be technically right, but I guarantee you that by your definition the vast majority of software out there is defective. Your point being? That it's
by zAy0LfpBZLC8mAC 11y ago
> You might be technically right, but I guarantee you that by your definition the vast majority of software out there is defective.
Your point being? That it's untechnically correct?
> The solutions you mention are non-trivial. It is really easy to make a mistake. While it may not be the operating systems fault at the end of the day, designing a system like this is setting up the overall experience for failure. A well designed system should make it easy to get right and not the other way around.
Which is all kindof true, but doesn't change that those APIs are the way they are, for historical reasons. Just because some API is broken, doesn't mean your code will work correctly when you pretend it's not broken.
edit: just to be sure: yes, the special-casing of zero-sized allocations is somewhat of a bug, which we still have to live with. Other than that, the API is actuall perfectly fine--if you don't check for allocation failures and you can't handle it if your program gets interrupted at any point, that's just a bug in your code, there is no useful general way to abstract those problems away.
- deleted 11y ago[deleted]