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

The idea is that, when you add a new field to the struct, the behavior should not change if that field is given its zero value. Thus, all the rest of your code continues to work as it did before.

If you change the code such that the zero value of that field makes the code behave differently, then yes, it's your responsibility to go find all the places that use the struct and update them. However, thanks to static typing and nice namespaces, that's trivial.



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

Search: