Re:Writing comments about pointer ownership
by nice_byte on Sunday August 23, 2015 @03:43AM
(#10104956)
Because the example is about an idiomatic way of enforcing exclusive pointer ownership. Maybe it wasn't a very good example though. A better example might be this: in the Builder design pattern, an object is built from various "parts" by the client. It's obvious that the object should have an exclusive ownership of all of its parts. However, at the time of creation, each part belongs to whoever created it, so the ownership needs to be transferred.
[ Parent
| on HN ]
There are no comments on this comment yet.