Information générale
Catégorie:
Programmation Orientée Object
John, Erik--
I've following this thread all day, and I appreciate the lucid, substantive discussion.
A couple of thoughts:
"Coupling" one class to another by letting it refer by name to another class's property makes sense (I've found) in tightly related classes. So, it's a matter of degree and surely the literature should (if it doesn't) deal with degree of relationship. (I don't know the *right* words here.)
Erik's comment that using _assign and _access to intercept and route a calculation, say, to the correct property assignments _by_the_owning_object is a very nice point. It does in fact seem to yield exactly the same encapsulation as a method.
From out here in the trenches, thanks for the *real life* discussion guys.
>>The property 'accessed' using access/assign doesn't even have to be the property that actually stores the value!
..snip
>This exact method was demostrated to me in VB. And it's a good one.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement