logoalt Hacker News

jokoon01/15/20265 repliesview on HN

I stopped reading when he started using the visitor pattern


Replies

ceronman01/15/2026

The visitor pattern is very common in programming language implementations. I've seen it in the Rust compiler, in the Java Compiler, in the Go compiler and in the Roslyn C# compiler. Also used extensively in JetBrains' IDEs.

What do you have against this pattern? Or what is a better alternative?

show 1 reply
kevthecoder01/15/2026

The bytecode interpreter in the second half of the book doesn't use the visitor pattern.

show 2 replies
volemo01/15/2026

What’s bad about the visitor pattern? /gen

show 1 reply
fuzztester01/15/2026

Why?