On Tue, 19 Mar 2024 00:40:02 GMT, Y. Srinivas Ramakrishna <y...@openjdk.org> 
wrote:

>> Brent Christian has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   further tweaks to reachability
>
> src/java.base/share/classes/java/lang/ref/package-info.java line 137:
> 
>> 135:  *
>> 136:  * A <em>reachable</em> object is any object that can be accessed in 
>> any potential
>> 137:  * continuing computation from any live thread (as stated in {@jls 
>> 12.6.1}).
> 
> This seems like somewhat loose and sloppy wording to me. "Any potential 
> continuing computation"? "Any live thread"? Could you share a pointer to JLS 
> 12.6.1 being referenced here?

https://docs.oracle.com/javase/specs/jls/se21/html/jls-12.html#jls-12.6.1

> A reachable object is any object that can be accessed in any potential 
> continuing computation from any live thread. 

It may be "loose" because the devil is in the details when it comes to 
reachability, but I disagree that it is "sloppy". This expresses reachability 
in simple terms, as a "first-order" or "Newtonian" model. There are of course 
"Quantum" effects that need to be dealt with in practice. The JLS alludes to 
this with:
> Optimizing transformations of a program can be designed that reduce the 
> number of objects that are reachable to be less than those which would 
> naively be considered reachable.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16644#discussion_r1529617062

Reply via email to