12/10/2012 8:12 AM, Mehrdad пишет:
On Monday, 10 December 2012 at 03:53:04 UTC, Walter Bright wrote:I do not dispute that deep copy is commonly used in C++. I challenge the idea that it is a good design pattern, i.e. better than using copy-on-write.Ignoring the design issue, it's plain faster -- for COW you have to perform checks on every call.
On every write obviously. In short - it depends on the use case. -- Dmitry Olshansky