jon.kiparsky, on 18 September 2012 - 11:27 AM, said:
Those are reasons for encapsulation.
jon.kiparsky, on 18 September 2012 - 11:27 AM, said:
Absolutely not. What's public is meant to be used by any other code, after all. That's Java.
Now, in Python, I throw a couple of underscores in front of the method. I tell you, the programmer, that it's not public. The language doesn't stop you from ignoring this, but that's your own damn fault.
Do you NEED the language to stop you? I'm serious. Security levels are tools, telling the programmer what do to. You can make it clear what's meant to be used and what isn't without hiding. So, you hide because... ?

New Topic/Question
Reply





MultiQuote




|