D 2015/2016 Vision?

Jim Hewes via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 11:51:15 PDT 2015


On 10/8/2015 8:51 AM, Ola Fosheim Grøstad wrote:
> On Thursday, 8 October 2015 at 14:13:30 UTC, Jonathan M Davis wrote:
> Yes, in general ownership should not be circular at all. It should be a
> DAG growing from the current actor/process/stack in an unbroken chain of
> ownership-references.
>

+1. Reference counting has not been much of an issue for me since using 
smart pointers because I rarely if ever need std::shared_ptr. It's about 
ownership and std::unique_ptr works fine for that. (std::shared_ptr gets 
overused and shouldn't be a substitute for a GC). Parents can own a 
resource with std::unique_ptr and distribute access to it using native 
pointers. You just need to be aware of lifetimes. I guess people might 
consider that having to worry about lifetime management is a 
disadvantage but I have no problem with it.


More information about the Digitalmars-d mailing list