2 ms·
> you have failed to say a reason for a dev to be "against" said feature Because as a developer I know we don't know how to implement it in a safe reliable wa
by chrisseaton 6y ago
> you have failed to say a reason for a dev to be "against" said feature
Because as a developer I know we don't know how to implement it in a safe reliable way. I want to write safe reliable code so I don't want to use this feature.
> The linked article make deterministic something that weren't before so my comment is not HS.
That's not what the article means by 'deterministic', I'm afraid. They're talking about it being deterministic at some point where the object is moved to. It doesn't make anything temporally more deterministic.
> If this is universal to all GCs that exists and that will ever exists
I think it's pretty fair to say that nobody in the industry knows how to make a reasonably high performance moving GC that is deterministic in when it frees objects. Maybe someone will invent one one day? I wouldn't hold my breath.
> Then how does autocloseable work?
Something important to know is that AutoClosable has nothing at all to do with the GC, so disregard that for this discussion. It just adds some code to be called after a lexical block. It doesn't know anything about whether the object is live or not.
> what is the difference with weak pointers?
Sorry not sure what this is asking - what is the difference between weak pointers and... what?
Reference queues are at least in-band and run under programmer control, but they're still non-deterministic in when (if!) a reference will be pushed to the queue.