> True enough - but this seems like extra work to me. Why not just keep
> track of everything as you create it? That way you'll always know
> what's going on instead of having to repeatedly cycle through all the
> windows to find the one you want.
"Keeping track of" is another way of saying "caching information
about". Caching is an optimization. Premature optimization is bad
because it increases complexity and therefore risk of bugs. Therefore,
unless you have a need to keep track of something (e.g. for
performance reasons), it's generally better practice to ask the system
for current information.
Put another way: always ask the system, and if the system needs to
cache the info, it can. That way, the benefit of caching is spread
while the complexity remains contained.
lj
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|