On Thu, 19 Jan 2023 13:24:03 GMT, Jim Laskey <jlas...@openjdk.org> wrote:

> Libraries cannot be all things to all users. A library provides a service 
> that would be difficult for a majority of users to implement on their own. 
> Sometimes a library needs specialization for certain use cases. That is why 
> we use subclassing and wrappers to extend existing libraries.
> 
> I think you will find that most BitSet users (including the JDK itself) want 
> basic bit operations with a minimal overhead. If there was additional 
> overhead, many would then roll their own versions to avoid that overhead. We 
> have conflicting goals.
> 
> BitSet has served all JDK users well since JDK 1.0. I think your concerns are 
> valid, but better cardinality would be best implemented as a subclass 
> (CardinalBitSet?) of BitSet. Once constructed, you could then propose the 
> addition to java.util with a CSR.
> 
> If you want to make a case for `includes(BitSet)` that should be proposed as 
> a separate CSR.

Ok, thanks a lot for the feedback. I will make a subclass instead. Have a nice 
day.

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

PR: https://git.openjdk.org/jdk/pull/11837

Reply via email to