On Sunday, 10 April 2022 at 23:05:24 UTC, norm wrote:
Hi All,
I am clearly misunderstanding something fundamental, and
probably obvious :D
Reading some of the discussions on __metadata I was wondering
if someone could explain why a immutable reference counting
type is needed. By definition a reference counter cannot be
immutable, so what would be the use case that requires it? It
cannot really be pure nor safe either because the ref goes out
of scope and the allocation is freed. How is this immutable?
Thanks,
Norm
refcounting would require a concept of "tail const" / "tail
immutable" so that transitivity of the qualifier does not affect
the data used to refcount (basically the field that hold the
count) but only the data that **are** refcounted.