From: mortee Date: 2007-09-20T01:47:57+09:00 Subject: Re: capturing access to array elements Robert Klemme wrote: > Actually I believe the delegation approach (whether with Delegator or > other) is the superior approach. Although not with problems of its own > (object identity) wrapping something in order to control access to it > seems the most natural way to do it because there is no way left for > direct manipulation of the Array (yes, I know that you can work your > way around that). My 0.02 EUR. You're right in a sense, and not in another. Currently, I use delegation for the exact same reason you mention: I can control all access to the underlying object. But I'd also want to have my object as a fully capable Array, so I'd have to cover all the Array methods anyway. And if that's the case, I may just override the object's methods themselves just as well. Delegation seemed slower to me than extending the object itself. But I may be confused by some other factors - I haven't done precise measurements discarding any other influences. mortee