The variables scope has a whole bunch of extra stuff in it (like all the methods, the 'this' scope), and it may contain state that you specifically don't want to include. By segregating the different types of state, you can easily pull out and deal with just the important stuff.
Whether or not you need a deep copy or not kind of depends on both the object in questions, and your specific definition of "deep". If you mean duplicating non-object complex data, then I'd say yes, but if you mean duplicating all complex data (including objects), then I'd say probably not. Most of your composited objects can be recreated based on the real instance data, and some of them would probably be very adverse to duplication (i.e. singletons). And of course, like everything else, there's not really a right or wrong answer without a complete context. cheers, barneyb On 9/26/05, Nando <[EMAIL PROTECTED]> wrote: > Barney, > > What's the drawback to passing the whole variables struct? That's an open > question. I'm ignorant here. > > In light of this discussion, *sounds* like we'd need a deep copy of the > variables struct. But again, i'm just trying to get a clear understanding of > the situation here. > > > The reason for not passing the whole variables struct is that that > > contains the 'this' scope and all the CFC methods as well as instance > > data. > > > > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
