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

They do have some use as a “currency type” - it’s fine if all your code picks i32, but then you might want to use a library that uses i64 and there could be bugs around the conversions.

And C also gives you the choice of unsigned or not. I prefer Google’s approach here (never use unsigned unless you want wrapping overflow) but unfortunately that’s definitely something everyone else disagrees on. And size_t itself is unsigned.



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

Search: