Quantcast
Channel: Posts/rss
Viewing all articles
Browse latest Browse all 38

Comment from Jonathan Snook

$
0
0
@Michael Jackson: In the post, I tried to be specific in saying that private methods should be avoided. Private properties are less of an issue as properties hold state and not logic. Although, even then, if you have multiple pieces relying on that variable, then extending that class becomes more difficult as any new methods won't have access to those private variables. There has to be an assumption that if someone is extending your code, that they hold the power, not you. Trying to hide the code in private methods or variables just means that it's harder for people to extend and ultimately may mean modifying your code directly to get the job done.

Viewing all articles
Browse latest Browse all 38

Trending Articles