Rebooting the __metada/__mutable discussion

RazvanN razvan.nitu1305 at gmail.com
Tue Apr 12 11:28:20 UTC 2022


On Saturday, 9 April 2022 at 06:25:10 UTC, vit wrote:

> Ref counted pointers in D have problem:
>
> RAII in D is bad: move ctor are not implemented,

Move ctor is in the process of making.

> overloading copy ctors sometimes crash dmd,


Overloading cpCtors with rvalue ctors sometimes crash the 
compiler because we don't have all the cases fleshed out. 
However, with https://github.com/dlang/dmd/pull/13976 if you do 
not template your rvalue constructors then you should be fine.


> copy ctors are not called from GC slices

This is also being worked on. We are templating the druntime 
hooks so cpCtors should be called then. Anyway, some cases have 
been fixed by now because and more will come (I know that Teo 
Dutu is almost done with templating the hooks that deal with ~= 
and ~ so cp ctors will be called for those).


> dtors have bad interaction with stack tuples/value sequences 
> and opCast, emplace...

Yeah, that's a big one.








More information about the Digitalmars-d mailing list