Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access and Assign vs. OOSE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00149911
Message ID:
00149946
Vues:
41
>Maybe it's academic, but responsibility for changing or exposing a property should be in the owner object and not in the calling object. Set Set and Get on object1 side are more in fitting with theory than Assign and Access on object 2 side....

But consider:

A. object2.SetMyProp(myvalue)

B. object2.myprop = myvalue

If in B myvalue is intercepted by object2.myprop's ASSIGN event and then assigned, is that similar to A?

>Then again, the argument could also be made that you can bend the rules within a single tier and physical layer (DLL,EXE) :-)

Hmmm. Not a purist's view, but I would agree with that.

>I'm having one of those "OOP vs. reality" intellectual crises :)

And on a Friday no less! Shame, shame. ;-)
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform