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

But now your program is weakly typed. Using the same logic, maybe your id is just an integer, but having an "ID" type will prevent bugs in the future, just like "dressing up" the dictionary with a meaningful name and exposing only the minimum amount of methods necessary will avoid people being tempted to, say, add things they shouldn't in your dictionary, not to mention that strong typing has a documentary value.


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

Search: