5 ms·
This is ok in general, but IMHO silently failing code (like a break condition that never happens because of overflow) is far worse than getting your arithmetic
by duaneb 13y ago
This is ok in general, but IMHO silently failing code (like a break condition that never happens because of overflow) is far worse than getting your arithmetic right. Getting it wrong implies a clear bug, whereas a seemingly bugless loop might be harder to identify as the source of the error.
- dllthomas 13y agoI think you either misread me, or I'm misreading you. I'm advocating the method that fails immediately (unsigned, so an underflow hits unmapped memory immediately and segfaults).