Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access and Assign vs. OOSE
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00149911
Message ID:
00149946
Views:
37
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform