|
|
|
|
|
by kgeist
1255 days ago
|
|
I'm quite paranoid about integer overflows, so in my hobby projects I now have a habit of always using helper functions (which generate an error on overflow) instead of "bare" math operators, and whenever I see a bare math operator without any checks in an open source project (and from what I've seen almost no one checks for overflows) I wonder whether they thought about potential consequences or I'm being too paranoid |
|
I think it makes a lot of sense to think about. Ultimately, it matters more in some applications than in others.