Re: SmartRef: The Smart Pointer In D

2018-06-08 Thread Martin Nowak via Digitalmars-d-announce
On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote: I will write more test before the frist release. And the docs is null. It on github: https://github.com/huntlabs/SmartRef I hope you know https://code.dlang.org/packages/automem.

Re: SmartRef: The Smart Pointer In D

2018-05-29 Thread Aedt 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:

Re: SmartRef: The Smart Pointer In D

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Saturday, 14 January 2017 at 15:41:01 UTC, Dmitry Olshansky wrote: That is C++ smart_ptr has to be atomic, while its D counter part may safely be non-atomic because everything is TLS be default. I assume you mean std::shared_ptr. The reference counting semantics are atomic, but the I

Re: SmartRef: The Smart Pointer In D

2017-01-16 Thread biozic via Digitalmars-d-announce
On Monday, 16 January 2017 at 01:54:35 UTC, Dsby wrote: On Sunday, 15 January 2017 at 17:24:25 UTC, biozic wrote: On Sunday, 15 January 2017 at 15:56:30 UTC, Dsby wrote: and : In https://github.com/dlang/phobos/blob/master/std/typecons.d#L147 ~this() { debug(Unique)

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Sunday, 15 January 2017 at 17:24:25 UTC, biozic wrote: On Sunday, 15 January 2017 at 15:56:30 UTC, Dsby wrote: and : In https://github.com/dlang/phobos/blob/master/std/typecons.d#L147 ~this() { debug(Unique) writeln("Unique destructor of ", (_p is null)? null: _p);

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread biozic via Digitalmars-d-announce
On Sunday, 15 January 2017 at 15:56:30 UTC, Dsby wrote: and : In https://github.com/dlang/phobos/blob/master/std/typecons.d#L147 ~this() { debug(Unique) writeln("Unique destructor of ", (_p is null)? null: _p); if (_p !is null) destroy(_p); _p = null; } if the

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Sunday, 15 January 2017 at 15:42:19 UTC, Dsby wrote: On Saturday, 14 January 2017 at 17:35:09 UTC, Nordlöw wrote: On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote: I write the ref count pointer and the scoped point in D. How do two of these differ from -

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Saturday, 14 January 2017 at 17:35:09 UTC, Nordlöw wrote: On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote: I write the ref count pointer and the scoped point in D. How do two of these differ from - https://dlang.org/phobos/std_typecons.html#.RefCounted -

Re: SmartRef: The Smart Pointer In D

2017-01-14 Thread Martin Nowak via Digitalmars-d-announce
On 01/14/2017 04:41 PM, Dmitry Olshansky wrote: > Not quite true, there is at least one huge advantage - thread-locality. > That is C++ smart_ptr has to be atomic, while its D counter part may > safely be non-atomic because everything is TLS be default. And you can add a shared postblit overload

Re: SmartRef: The Smart Pointer In D

2017-01-14 Thread Nordlöw 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. How do two of these differ from - https://dlang.org/phobos/std_typecons.html#.RefCounted - https://dlang.org/phobos/std_typecons.html#.Unique under

Re: SmartRef: The Smart Pointer In D

2017-01-14 Thread Chris Wright via Digitalmars-d-announce
On Sat, 14 Jan 2017 11:52:34 +, nbro wrote: > 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. I posted about this in general. A GC for Java, Python,

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,

Re: SmartRef: The Smart Pointer In D

2017-01-13 Thread Chris Wright via Digitalmars-d-announce
On Sat, 14 Jan 2017 02:05:11 +, nbro wrote: > 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

Re: SmartRef: The Smart Pointer In D

2017-01-13 Thread Swoorup Joshi via Digitalmars-d-announce
On Saturday, 14 January 2017 at 02:05:11 UTC, nbro wrote: 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

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:

SmartRef: The Smart Pointer In D

2017-01-13 Thread Dsby via Digitalmars-d-announce
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