4 ms·
There's no point in putting a "private/public/protected" security model in a programming language. It isn't a security boundary. It’s about intention. If I mar
by scarface74 8y ago
There's no point in putting a "private/public/protected" security model in a programming language. It isn't a security boundary.
It’s about intention. If I mark a property or method as private, it means that I can get rid of it, rename it or change the expected behavior without considering it a breaking chance.
- kevin_thibedeau 8y agoYAGNI rules the day.
- scarface74 8y agoYou’ve never had to refactor code that was used as a library by other developers? Do you realize how many hacks is built into Windows just because developers were using undocumented features?
- marcosdumay 8y agoYeah, and Python has some standard nomenclature for marking a property as protected and a little bit of behavior for helping mark it as private. You do not need encapsulation for that.
- scarface74 8y agoAnd there is nothing about the Pythom runtime stopping someone from using it anyway. With a statically typed language, you really have to go out of your way to do it like using reflection and if your code breaks on an update you get what you deserve.