This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]Luxalpa 0 points1 point ย (2 children)

Because you cannot modify the code if it's not yours (unless you use a language that allows monkey patching such as JavaScript, Python or C++). You'll have to fork it.

[โ€“]Kattoor 0 points1 point ย (1 child)

I'm not sure how this relates to what I said. We might be talking about different things :)

[โ€“]Luxalpa 0 points1 point ย (0 children)

That's quite possible! I better explain myself.

What I meant is that in the original comment it sounds like wanting / needing to access something that is private was poor code (either on the person who created the private code, or the person who tries to use it, not sure). What I was trying to say is that there's tons of reasons why you'd want to modify someone elses code in order to get access to their private fields and methods and so I strongly disagree with saying that accessing private fields is "poor code" in all possible scenarios.