You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "mikemccand (via GitHub)" <gi...@apache.org> on 2023/11/02 12:40:06 UTC
Re: [PR] Use `instanceof` pattern-matching where possible [lucene]
mikemccand commented on PR #12295:
URL: https://github.com/apache/lucene/pull/12295#issuecomment-1790653367
In general it's great for Lucene devs to use the new language features we gain by setting a minimum Java version. This is (part of?) why we have such minimums!
This nice `instanceof` pattern matching was [introduced in Java 14](https://blogs.oracle.com/javamagazine/post/pattern-matching-for-instanceof-in-java-14), and since `main` (to be 10.0) requires Java 17 or 18, we can use nice new feature.
But we cannot backport to 9.x since it supports Java 11+, but I think that added burden (on backport) is OK. We accumulate such burden as the source code diverges anyways...
Thanks for persisting here @JarvisCraft -- +1 to the plan to revert the `equals` method changes (and maybe do a follow-on PR to "standardize" those), and merge the rest of this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org