Allocator-aware @safe reference counting is still not possible

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Jan 23 07:13:04 UTC 2023


On 23/01/2023 3:07 PM, jmh530 wrote:
> Another question is whether an affine type or qualifier is better than 
> @live for handling the borrow checker behavior. If such a thing existed 
> would there be a demand for isolated?

Yes I believe a type qualifier (scope), would be better suited towards a 
borrow checker than any other solution.

Essentially a borrow checker just says, an owning reference lifetime 
must exceed that of a borrowed reference. It guarantees the right order 
of death for them.

Its so simple, we already have a ton of logic to support this with 
DIP1000! We don't need new syntax, just some smarter semantics 
surrounding owning/borrowing.

Just to be clear, I don't think @live solves any problem that the D 
community has. It is useless.

Here is how much @live is used (note we know it is severely incomplete):

https://issues.dlang.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=dmd&f0=OP&f1=OP&f2=assigned_to&f3=CP&f4=CP&j1=OR&list_id=243775&o2=substring&query_format=advanced&short_desc=%40live&short_desc_type=allwordssubstr&v2=live

None. Not a one bug report. Nobody uses it today. Because we don't need it.


More information about the Digitalmars-d mailing list