4 ms·
No, i did not implied that, please do not put words in my mouth. My implication was software that if it fails it will kill people. Otherwise if a program cras
by Crinus 7y ago
No, i did not implied that, please do not put words in my mouth.
My implication was software that if it fails it will kill people.
Otherwise if a program crashes because of a situation happens once every 100000000 runs, not only is worthless to worry about it, it actually is preferable to not do that as to keep the codebase clean and hence easier to maintain for bugs that actually do affect people.
- mark-r 7y agoKeeping the codebase clean is why I prefer that allocation errors throw an exception rather than returning NULL.
- cesarb 7y agoBut then you have to worry about exception safety on every code which might call an allocating function, making the code more complex. This is worse on C++ where even innocent-looking code could be allocating memory in the middle of an operation (for instance, by calling a copy constructor which allocates).