Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's more important than preaching about signed vs unsigned is raising awareness not to use both.

Most signed/unsigned related bugs (outside numerical/math sensitive domain) are due to using both simultaneously and the side effect is of course going to be overflow/underflow.

On the other hand, I'd favor int over unsigned as it's more practical when dealing with memory address arithmetic & array indices due to address difference being signed.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: