Copy Constructor vs the Encapsulation Boundary
From CSSEMediaWiki
Revision as of 02:36, 16 July 2010 by Lukas Korsika (Talk | contribs)
In choosing Object Encapsulation over Class Encapsulation we encounter problems implementing methods such as Java's equals(). Another standard idiom that appears to be incompatible with Object Encapsulation is the Copy Constructor. This page is designed for discussion about whether Copy Constructor is a useful idiom in the first place, and if so, how to design it in a clean way in the presence of Object Encapsulation.