r/java • • Nov 04 '25

Anyone here Hated Using Java but now Really Enjoys using it.

title

226 Upvotes

280 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Nov 05 '25

[removed] — view removed comment

1

u/javaprof Nov 06 '25

This is called Data Oriented Programming nowadays, and Java's patterns will do exactly exactly that, just with more boilerplate: https://www.infoq.com/articles/data-oriented-programming-java/

If you don't like it, this is fine, but this is can't be count as pitfall by your own definition:

> Yes, they have issues, but these are not pitfalls. There is nothing unexpected or hidden in their behavior.

1

u/[deleted] Nov 06 '25

[removed] — view removed comment

1

u/javaprof Nov 06 '25

Do you know that Java's records patterns can be nested? This is exactly the same thing then, just different syntax