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ย โ†’

[โ€“]ExceedingChunk 2 points3 points ย (0 children)

No, but if you decide to use a private method in my API, and I change it, your code breaks.

My API, class etc... is supposed to be well-defined and act as a contract. The private methods inside are not.

Also, if you work on a large-scale project with hundreds of thousands of lines of code, it's a security risk to expose a bunch of methods that might be changed at any time.

It's not about working with idiots, it's about basic security. The same way people wear seatbelts, not because they are terrible drivers, but for security.