▲ | weebull 7 months ago | ||||||||||||||||
One of the things I loved about Python when I learnt it was how it dealt with `public`\`private`\protected``. It was "we're all responsible adults. No need to hide anything. We'll just use a naming convention for members that we don't expect people to directly use." "Enforce encapsulation" suddenly became. "Respect encapsulation" in my head and a bunch of Java/C++ problems evaporated. | |||||||||||||||||
▲ | kstrauser 7 months ago | parent [-] | ||||||||||||||||
I do love that about Python. The encapsulation is there but you can work around it if you’re willing to take responsibility for breaking the gentlemen’s agreement. That’s a lovely pattern. | |||||||||||||||||
|