> Yes, which is why it is often as much or more work to clone an > existing object as it is to simply create / initialize it. The clone > has to be created and then data initialized from the old object, > something with additional logic to decide what to do on top of that. > And, true, there are also cases where clone does less work if it only > needs to shallow copy something rather than clone sub-elements.
(Run-on sentence follows) In the instance where you really do need to clone an object in CF, would you recommend having the object (and any it is composed of) implement something like an ICloneable interface, or splitting the cloning functionality out to a "helper" class like a DocumentCloner that would clone a Document, its Versions (duplicates of original), and its Creator (simple reference to same as original)? -Joe > -- > Sean A Corfield -- http://corfield.org/ > Team Fusebox -- http://fusebox.org/ > Got Gmail? -- I have 50, yes 50, invites to give away! > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > ---------------------------------------------------------- > 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] > > -- Get Glued! The Model-Glue ColdFusion Framework http://www.model-glue.com ---------------------------------------------------------- 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]
