▲ | cyberax 9 days ago | |
No. The code can be rewritten without visitors using iterators for traversal, for example). But it'll look badly. Visitors in the linked example are real classic visitors. The code _within_ the visitor methods, of course, uses pattern matching, but the pattern itself is not materially different from C++. Exhaustiveness checking for pattern matching is also "best effort" for complex matching. |