Safe reference counting cannot be implemented as a library
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 28 07:58:02 PDT 2015
On 10/28/2015 04:13 AM, Jacob Carlborg wrote:
> On 2015-10-27 22:19, Andrei Alexandrescu wrote:
>
>> That doesn't seem to be the case at all. -- Andrei
>
> I'm not a C++ or Rust expert. But I think that in Rust and with the new
> C++ guide lines the idea is to use reference counting pointers only for
> owning resources. If you want to pass the data to some of part of the
> code, that does not need to own the resource, a raw pointer should be used.
Problem with that is in C++ it's just unsafe and in Rust it's requires
too much work from the programmer. We don't think either style is best
for D. -- Andrei
More information about the Digitalmars-d
mailing list