Hacker News new | past | comments | ask | show | jobs | submit login

> To apply the uniform access principle to the Part type, we could change the struct definition and provide setter/getter methods

If you have to apply it, it isn't uniform access. The point of the principle is that the call-site shouldn't distinguish between getters and fields so that the implementer can change that decision freely without breaking callers.

Nice article, though!




Thanks for the clarification.




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

Search: