in reply to Re: Re: multi-tier collections & lack of modulization/OO
in thread multi-tier collections & lack of modulization/OO
The attributes could then be obtained via access to the object's methods. ...perhaps a "getstat()" method which would return a reference to a hash of stats.
Such an approach would guarantee that the stats are always accurate, as there would be essentially no way to modify the array without the stats being recalculated. Performance would suffer a bit, but accuracy would be guaranteed. By using a tied array, the user could do whatever the hell he wants, directly to the array, and an accurate stat. would still be maintained.
:) Just a thought. And of course, it came to me because I've been playing with tied variables the past few days. Seems like a cool solution though.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: multi-tier collections & lack of modulization/OO
by BUU (Prior) on Dec 12, 2003 at 06:43 UTC | |
by davido (Cardinal) on Dec 12, 2003 at 06:53 UTC |