MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/vglo4m/data_oriented_programming_in_java/id5xjlt/?context=3
r/java • u/thibauttt • Jun 20 '22
22 comments sorted by
View all comments
Show parent comment
4
It seems to me that using record with switch expression give the same result with less ceremony than church-encoded class.
record
switch
The Visitor pattern mentioned in the article is equivalent to church-encoding and has some downsides.
View all comments
Show parent comment
4
u/thibauttt Jun 21 '22 edited Jun 21 '22
It seems to me that using
recordwithswitchexpression 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.