A betterC base

Mike Franklin slavo5150 at yahoo.com
Fri Feb 9 01:36:02 UTC 2018


On Friday, 9 February 2018 at 01:31:41 UTC, Mike Franklin wrote:
> On Thursday, 8 February 2018 at 17:10:00 UTC, bachmeier wrote:
>
>> What are D's limitations on do-it-yourself reference counting?
>
>  * Types that are built into the language like dynamic arrays, 
> associative arrays, and exceptions won't benefit from DIY 
> reference counting.
>  * Much of Phobos probably wouldn't be compatible with DIY 
> reference counting.
>
> That being said, there may be a way to override some runtime 
> hooks like _d_newclass 
> (https://dlang.org/library/rt/lifetime/_d_newclass.html), 
> etc... to make it work.  But I haven't tried.
>
> Also, I think Walter is currently working on getting reference 
> counted exceptions into the language:  
> https://github.com/dlang/druntime/pull/1995
>
> Mike

Also, I think DIY reference counting is already done for us in 
the automem library 
https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/

Mike



More information about the Digitalmars-d mailing list