RCArray is unsafe

via Digitalmars-d digitalmars-d at puremagic.com
Wed Mar 4 09:10:00 PST 2015

On Wednesday, 4 March 2015 at 17:06:53 UTC, Walter Bright wrote:
> On 3/4/2015 6:27 AM, ponce wrote:
>> You define a clear owner for everything so that this never 
>> happens.
>> That's what we do in C++ and shared_ptr is can be avoided as 
>> much as we like.
> C++ doesn't have ownership annotations and no checkable notion 
> of a clear owner.

The standard library + type system provides mechanisms for clear 
ownership, but it does not check borrowing. Borrowing is 
potentially unsafe, and the programmer knows it, but it is not a 
big deal.

More information about the Digitalmars-d mailing list