Re: SmartRef: The Smart Pointer In D

2017-01-14 Thread nbro via Digitalmars-d-announce

On Saturday, 14 January 2017 at 04:14:11 UTC, Chris Wright wrote:


It's reference counting.

Reference counting is like garbage collection, but deamortized. 
This is better for real-time applications. However, it adds 
overhead on every assignment and every variable going out of 
scope.


In D, garbage collection is more expensive than it is in other 
languages, so the tradeoff is more attractive than it would be 
in other languages.


Garbage collection in D is more expensive just because of the 
poor implementation, from what I've heard. If that's the case, 
people who work on it should be able to improve it over time.




Re: SmartRef: The Smart Pointer In D

2017-01-13 Thread nbro via Digitalmars-d-announce

On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote:

I write the ref count pointer and the scoped point in D.
it just Like cpp's shared_ptr , waek_ptr and unique_ptr .
Now, it is  Developing.
I will write more test before the frist release.
And the docs is null.
It on github: https://github.com/huntlabs/SmartRef


What's would be the advantages of smart pointers in D?