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.
View all comments
Show parent comment
9
u/[deleted] Feb 17 '26
[removed] — view removed comment