Skip to content

Comment on Compiler Development: Rust or OCaml?

Comments

isn't rust kind of a nonstarter for cfg representations which are irreducibly cyclic? yes, one can use the pointers are array-indices thing, but ..

No, it's not. For a toy compiler (or for compiling programs with small CFGs), you can use Rc/Weak to represent cycles. For a "real" compiler you'd be using an arena for allocations anyway, which amounts to pointers-are-array-indices.

AboutSource Built by g1lg1l

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