> In modern Java, the visitor pattern is no longer needed. Using sealed types and switches with pattern matching achieves the same goals with less code and less complexity.