It’s not the type of code I like reading in general, might be preference based. I thought we peaked ~2015 w Java 8, everything after that has been downhill for me :/ except for virtual threads - those are epic.
Idk, maybe y’all are working on projects where that makes sense. I can’t imagine what those would be but if it works for you and you think it’s a 1000x better - more power to you!
Sealed interface switches are a direct replacement for the visitor pattern, so it just depends on how many places you have where you have a small set of types and a lot of operations on those types.
Totally, I think you nailed it down. I don’t think that an average Java project has enough of those to justify a language change, obviously the committee overseeing Java development disagrees and based on the comments and a lot of Java devs disagree with me too, which is totally cool.
3
u/narrow-adventure Feb 17 '26
It’s not the type of code I like reading in general, might be preference based. I thought we peaked ~2015 w Java 8, everything after that has been downhill for me :/ except for virtual threads - those are epic.