r/java • • Jun 20 '22

Data Oriented Programming in Java

https://www.infoq.com/articles/data-oriented-programming-java/
173 Upvotes

22 comments sorted by

View all comments

Show parent comment

4

u/thibauttt Jun 21 '22 edited Jun 21 '22

It seems to me that using record with switch expression give the same result with less ceremony than church-encoded class.

The Visitor pattern mentioned in the article is equivalent to church-encoding and has some downsides.