From: Seebs Date: 2009-11-07T01:50:12+09:00 Subject: Re: encapsulation issue On 2009-11-06, James French wrote: > But then I can't legitimately push to it in addDependency... No, but you could dup-and-append when you hit that. I think you pretty much have to dup the object in this case. Hmm. Okay, imagine this. Define a new Array-like class, which has an Array as an internal member, but overrides all the things which modify that array, then return one wrapped around the object. At least you're then limiting the amount of duplication you do. A question naturally arises: What do you want to happen if I try to send a modify-yourself message to a member of the array? -s -- Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!