4 ms·
We're all consenting adults. Python gets by just fine on this principle.
by sgk284 14y ago
We're all consenting adults. Python gets by just fine on this principle.
- zanny 14y agoThe argument from the Java camp is that if you always use the getters and setters, you leave the access and modification open to extension, say, by adding a callback listener for changes to a variable. I then just say, change it when you need it, and use that fancy "find usages" thing most IDEs and vim have.
- ufo 14y agoPrecisely. The real reason Python gets this right is that it the properties feature lets you write `obj.foo` but still call a `getFoo` method behind the scenes.