Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Speed Thingy
Message
From
29/10/2003 09:55:51
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00843972
Message ID:
00844072
Views:
19
Nigel

It seems to boil down to whether you can be sure the child object exists when you call it. If not, you do need to check at each call.

re speed: rick Strahl's West Wind performs a number of checks in standard classes like the process server and response classes; the reality is that the speed difference is so small and the benefits of encapsulation so large that it is worth it.

If the calling object is persistent then you could include a single check in its init to make sure the child is there when the caller is instantiated, after which you can be sure it is there and don't have to keep checking.

Regards

JR
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Reply
Map
View

Click here to load this message in the networking platform