Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-27 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Simplify handling of cached keySet, values, and entrySet views. - Changes: - all: https://git.openjdk.org/jdk/pull/7387/fil

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. Hi Erik,

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 11:28:39 GMT, Rémi Forax wrote: > Hi Erik, I think you misunderstood me, currently Oracle supports most of the > development of the OpenJDK financially, that's a fact and i'm glad that > Oracle has taken that mantle because I'm remembering very well the sad state > of Java

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. This is

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Eirik Bjorsnos
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. > This i

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. src/java

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 19:06:20 GMT, Chen Liang wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/SequencedCollec

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Tagir F . Valeev
On Wed, 29 Mar 2023 19:20:16 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/util/SequencedCollection.java line 107: >> >>> 105: */ >>> 106: default void addFirst(E e) { >>> 107: throw new UnsupportedOperationException(); >> >> Can this be defaulted to `this.reversed

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 19:54:48 GMT, Tagir F. Valeev wrote: >> In the same spirit, `reversed()` should also have a default implementation >> equivalent to >> >> >> Collections.unmodifiableSequenceCollection(Arrays.asList(this.toArray())).reversed() > > @forax but this would not be a view: chang

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. In the J

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 20:54:15 GMT, Chen Liang wrote: >> Yes, >> The spec says :"Changes to the underlying collection might or might not be >> visible in this reversed view, depending upon the implementation." so i >> believe the default implementation i proposed is a valid implementation > > In

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Wed, 29 Mar 2023 20:05:10 GMT, Rémi Forax wrote: >> @forax but this would not be a view: changes in the underlying collection >> won't be reflected > > Yes, > The spec says :"Changes to the underlying collection might or might not be > visible in this reversed view, depending upon the implem

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Wed, 29 Mar 2023 21:18:04 GMT, Rémi Forax wrote: >> In the JEP, it says: >>> Any modifications to the original collection are visible in the view. >> >> If we don't have an efficient reversed view, I don't see a point of >> declaring a collection sequenced; same reason for declaring a >> se

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Stuart Marks
On Wed, 29 Mar 2023 13:09:52 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > This is taking a personal turn and I do not see the p

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Stuart Marks
On Wed, 29 Mar 2023 21:18:02 GMT, Chen Liang wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > In the JEP: >> A sequenced collection supports common

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-30 Thread Tagir F . Valeev
On Fri, 24 Mar 2023 21:39:09 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/LinkedHash

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-30 Thread Tagir F . Valeev
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. src/java

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-30 Thread Tagir F . Valeev
On Thu, 30 Mar 2023 06:41:38 GMT, Stuart Marks wrote: >> In the JEP: >>> A sequenced collection supports common operations at either end, and it >>> supports processing the elements from first to last and from last to first >>> (i.e., forward and reverse). >> >>> The reverse-ordered view enabl

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-30 Thread Chen Liang
On Wed, 29 Mar 2023 21:18:02 GMT, Chen Liang wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > In the JEP: >> A sequenced collection supports common

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-14 Thread Stuart Marks
On Thu, 30 Mar 2023 09:39:14 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/LinkedHash

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-14 Thread Stuart Marks
On Thu, 30 Mar 2023 09:20:16 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/SequencedC

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-17 Thread Stuart Marks
On Thu, 30 Mar 2023 11:33:14 GMT, Chen Liang wrote: >> In the JEP: >>> A sequenced collection supports common operations at either end, and it >>> supports processing the elements from first to last and from last to first >>> (i.e., forward and reverse). >> >>> The reverse-ordered view enables

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-18 Thread Stuart Marks
On Thu, 30 Mar 2023 09:23:04 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/SequencedC

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-24 Thread Stuart Marks
On Thu, 30 Mar 2023 09:56:58 GMT, Tagir F. Valeev wrote: >> @liach >> >> I understand that you're suggesting adding various default implementations >> in order to make it easier for people to bring up implementations of >> SequencedCollections. However, adding default implementations to >> S

Re: RFR: 8266571: Sequenced Collections [v4]

2023-07-21 Thread Stuart Marks
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. Removing