I'm not sure who is using encapsulation for anything security related. It's a drawer, not a bank vault.<p>Sometimes it really is getting in the way. Other times it's there to remind you "Hey, you can't access this hidden thing for a reason, because the library author believes it is bad practice to write anything that depends on it, once you're at a layer that has this object, you shouldn't need to look at it".<p>Sometimes that really makes big problems, sometimes they're probably right and your code that takes an image file should not look at the current mouse position, because then it would be hard to make it work in some other context where you don't have that.