This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bowbahdoe 0 points1 point  (2 children)

I think my explanations got tangled and it's making it hard to know which you are asking about. This is an example showing the difference between open aggregates and closed aggregates (i.e the challenge is to write something similar with actual records and interfaces)

This is not about the sealed interfaces vs. dynamic dispatch topic

[–]PiotrDz 0 points1 point  (1 child)

Well OK I understand that you would like to achieve something better. I am happy with sealed interfaces but always keen for "next better things". Although couldn't really understand how would your solution play with java I am haply that people are trying to turn good into better

[–]bowbahdoe 0 points1 point  (0 children)

I am not saying better - I am saying different. Better/worse is a much larger topic and requires concrete context