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

Signed integers should be used as sparingly as floating-point. They should not be used in ordinary code because ordinary code has no use for them until they break something.

The most notable exception would be languages which allow negative indexing, but IMHO if that were syntactic instead of relying on actual signed integers, it would be safer (I.e., [- $int] would be a different syntax from [(-$int)] and the latter would not be correctly typed.)



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

Search: