Reference counting with fat pointers
IGotD-
nise at nise.com
Wed Jun 24 10:37:01 UTC 2020
On Saturday, 26 July 2014 at 10:49:25 UTC, Marc Schütz wrote:
>
> Interesting proposal. It seems that you want to change the
> default for pointers in D, but Walter will probably not like
> that ;-). But I wonder how much language support this actually
> needs, much of it seems implementable with templates, which is
> probably much more acceptable.
>
We should not change the default behaviour of the pointers in D.
However, we can add a fat pointer type, Let's say
int^ p = new int;
That would have zero breaking changes. I would even take further
and allow several types of fat pointers in order to have allow
several different types of fat pointers.
int^(RefCounted) = new int;
What happens if.
auto p = new int;
Well, in order not to break anything we have make p an int*.
Fat pointers are obviously needed but nothing happens. Why?
More information about the Digitalmars-d
mailing list