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

Not much worse than zip codes with letters.


If you're trying to store numbers that might start with a zero using an integer type, you're doing it wrong anyway. A rule of thumb is to ask yourself the question: what does the result of adding two such values mean?


Does that mean that e.g. numeric user ID should also me strings since adding them is meaningless?


Nothing difficult about zip codes as long as you treat them as strings :)


Canada says hi.




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

Search: