Suppose you'd already published a Triangle class API and then discovered
you needed more dynamism. The property feature lets you sneak in some
methods without changing the already-published API and breaking client
code.
A lot of these lessons about robust software development come from group or
Yeah for naivety!
In the pretty widely discussed article:
Python Is Not Java
http://dirtsimple.org/2004/12/python-is-not-java.html
Getters and setters are evil. Evil, evil, I say! Python objects are not Java
beans. Do not write getters and setters. This is what the 'property'
built-in is for.
Kirby Urner wrote:
So I find that rejecting it as naïve is fundamentally unresponsive.
Art
However in this case I don't think your views were rejected as naïve. On
the contrary, your views permeated a sophisticated discussion of use cases,
and design patterns more generally (s'been a rich
Kirby seems comfortable in the Meyerist camp.
I think you might be reading something too sinister into information
hiding and are therefore against it.
The brutal real world truth is the client wants an API that works today, but
will complain if it doesn't deliver tomorrow, even if specs