Y
Hacker News
new
|
ask
|
show
|
jobs
by
duped
46 days ago
> The unsigned integers should not wrap by default.
What would you do instead?
1 comments
Mond_
46 days ago
How about just panic? If a wrap happens and you don't expect it, it's almost always a severe bug.
Then, dedicated APIs for wrapping behavior where you expect it to happen.
link
duped
46 days ago
Because it adds 4-6x overhead to all integer arithmetic
link
Then, dedicated APIs for wrapping behavior where you expect it to happen.