September 28, 2005 Re: References and deleting objects Clarification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | In article <opsxt1eskp23k2f5@nrage.netwin.co.nz>, Regan Heath says... > >My opinion remains that the inability to create a solid reference counting implementation is a weakness in D. I agree that it's 'seldom' required (due to D being garbage collected) but when you need one, you need something solid, reliable and flexible enough to handle the different use cases. The current situation is too easy to break. Destruction is non-deterministic and therefore unreliable. Very much agreed. Cross-scope RAII is awkward to impossible in D, while shared_ptr in C++ TR1 is being sold as a solution for this exact problem. Simply put, GC is a fantastic tool, but it's not a universal solution. And 'auto' simply doesn't make up the difference. Sean |
September 28, 2005 Re: References and deleting objects Clarification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath |
Regan Heath wrote:
>
> My opinion remains that the inability to create a solid reference counting implementation is a weakness in D. I agree that it's 'seldom' required (due to D being garbage collected) but when you need one, you need something solid, reliable and flexible enough to handle the different use cases. The current situation is too easy to break. Destruction is non-deterministic and therefore unreliable.
>
I completely agree. it can be done but some minor things seem to be a slight more hastle than in C. i was originally hoping D had native reference counted objects to go with it. i think that would be pretty cool.
|
Copyright © 1999-2021 by the D Language Foundation