Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-05 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-05 Thread Maurizio Cimadamore
On Wed, 2 Apr 2025 11:43:40 GMT, Maurizio Cimadamore wrote: >> I didn't mean to say "this is not true, so use a `static final` instead". >> What I meant was more "let's not dive into VM-specific details now" (see my >> other comment on the topic), and just focus on semantics instead. Then let'

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-04 Thread Maurizio Cimadamore
On Wed, 2 Apr 2025 09:13:21 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/StableValue.java line 52: >> >>> 50: * A stable value is a deferred holder of shallowly immutable content. >>> 51: * >>> 52: * A {@code StableValue} can be created using the factory method >> >> s/c

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-04 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-04 Thread Per Minborg
On Wed, 2 Apr 2025 09:34:57 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add lazy toSting for StableMap::values >> - Make toString for reversed and sublist lazy > > src/java.base/shar

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-03 Thread Per Minborg
On Wed, 2 Apr 2025 09:26:52 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/StableValue.java line 461: >> >>> 459: * An unset stable value has no content. >>> 460: * >>> 461: * The returned stable value is not {@link Serializable}. >> >> I find the clai

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Alan Bateman
On Wed, 2 Apr 2025 12:56:23 GMT, Per Minborg wrote: >> Same in other factories... > > We had that originally and then I got the comment to move them to the > factories so I am happy to do either as soon as we agree on the best way to > do it. I'm also puzzled as to why this is here as it becom

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Wed, 2 Apr 2025 09:13:32 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add lazy toSting for StableMap::values >> - Make toString for reversed and sublist lazy > > src/java.base/shar

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Per Minborg
On Wed, 2 Apr 2025 09:21:17 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add lazy toSting for StableMap::values >> - Make toString for reversed and sublist lazy > > src/java.base/shar

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Per Minborg
On Wed, 2 Apr 2025 09:00:38 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add lazy toSting for StableMap::values >> - Make toString for reversed and sublist lazy > > src/java.base/shar

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Wed, 2 Apr 2025 11:37:56 GMT, Maurizio Cimadamore wrote: >> I've used `static` fields now to get out of the muddy waters of trusted >> final fields, records etc. > > I didn't mean to say "this is not true, so use a `static final` instead". > What I meant was more "let's not dive into VM-spe

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Wed, 2 Apr 2025 11:34:24 GMT, Per Minborg wrote: >> Now that we have removed the VM-specific handling of fields declared as >> `StableValue`, this is true. I will take a look at improving the wording. > > I've used `static` fields now to get out of the muddy waters of trusted final > fields,

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Per Minborg
On Wed, 2 Apr 2025 09:17:23 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/StableValue.java line 95: >> >>> 93: * >>> 94: * Note that the holder value can only be set at most once. >>> 95: * In the example above, the {@code logger} field is declared {@code >>> final} which

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Per Minborg
On Wed, 2 Apr 2025 08:29:54 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add lazy toSting for StableMap::values >> - Make toString for reversed and sublist lazy > > src/java.base/shar

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-02 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-01 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with two additional commits since the last revision: - Add lazy toSting for StableMap::values - Make toString for reversed and sublist lazy - Changes: - all: https: