On 26-Nov-08, at 5:28 PM, Lars Jensen wrote:
ie/ you have no clue if
myclass.someProperty = 6
is implemented as
a naked public property
a getter setter pair with a setter like someProperty(assigns i as
integer)
a computed property with a setter
Right. My point is that Class Interfaces require you to have a clue,
and this can be considered a weakness by fans of information hiding.
They specify not just an API but a specific set of method signatures.
it does only because you cannot provide the implementation of the
getter / setter method pair by a public property or computed property
if you could then the interface would be fine and the implementation
would be 100% up to the implementing class
but that's not possible
and the contract would be simply behavior and not a mish mash of
behavior and data
pure abstract classes are "interfaces" in C++ .. and you dont put
properties in them either :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|