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

This sounds like exposing internal implementation details. You're pushing some complexity onto the caller, and breaking up the uniformity of the interface. Sometimes the caller will want to manage that complexity for the reasons that you describe, but it's not always good to force the caller to wrangle that complexity.

Design trade-offs, as always. I get why you would do it your way, and it makes sense in some applications. But for some applications the fact that you're hiding which specific bits of state each function depends on, is actually the point of using a class.



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

Search: