

Ask HN: Better coding idioms for tree processing? - erichocean

Is the Visitor pattern really the best we've got for tree processing?<p>I'm processing tree data structures, possibly with embedded links (so they're actually DAGs), iteratively, with a different processing step each time. The code is very similar in spirit to writing an LLVM pass: http://llvm.org/docs/WritingAnLLVMPass.html<p>If you have any links to research or articles on coding idioms for tree processing, or other insight, I'd very much appreciate it. :)
======
francishaart
what language? the visitor pattern is for non-functional languages, like java.
writing a parser in (e.g.) haskell is very natural with pattern matching.

