Skip to content

Comment on Ask HN: Testing AST or assembly output for a compiler

Comments

Honestly, I think the biggest win is just having a solid test harness that can compare AST snapshots across versions. It’s not glamorous, but it catches regressions early and gives you confidence when you refactor the optimizer. Maybe throw in some fuzzing on the AST nodes and see what breaks – it’s surprisingly fun.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.