Skip to content

Comment on Metaprogramming in Zig and parsing CSSparent

Comments

Zig lets you explicitly specify `defer` handlers but it doesn't have any way for having implicit/automatic defer handles. So, for example, you can do reference counting in Zig either completely manually or a little less manually with `defer`. But you can't do C++-style smart pointers where you don't need to specify any `defer` and automatically have cleanup run at the end of the block/function.

AboutSource Built by g1lg1l

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