# C3's compile-time reflection rivals C++ and Zig with far less ceremony

Original title: Comparing reflection capabilities of C++, Zig and C3

> Hacker News story 49771873 · language: en · submitted 2026-09-20
> Web version: https://zeli.app/story/49771873
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 11 · by [ManuLinares](<https://news.ycombinator.com/user?id=ManuLinares>) · 💬 7
[original](<https://nyr24.github.io/blog/reflection-comparison/>) · [HN discussion](<https://news.ycombinator.com/item?id=49771873>)

## Summary

C3, a new systems language, uses $-prefixed syntax and macros to make compile-time reflection explicit and readable. The author compares enum-to-string conversion, struct introspection, and attribute validation across C++ (with its upcoming reflection), Zig, and C3. C3 matches C++'s power while being easier to follow, and unlike Zig, it's already on 0.8.x with 1.0 approaching.

## Key quote

> It's a lot more stable than Zig (honestly, it's pretty embarrassing that Zig is still stuck on 0.1x versions after over 10 years of development), and since C3 is already on 0.8.x versions, 1.0 is very close.

## HN discussion (7 comments)

### [peesem](<https://news.ycombinator.com/item?id=49772174>)

> "not an expert in zig" but you can't even look at the documentation to find the `@tagName` builtin to do exactly the problem posed?: https://ziglang.org/documentation/0.16.0/#tagName
>
> i can literally google "zig enum to string" and the first result is a reddit post where the given solution is `@tagName`. i'm ready to write this post off as a low-effort ad for C3

### [RyanVail](<https://news.ycombinator.com/item?id=49772405>)

> Zig doesn't have attributes, but you could just create a thin wrapper struct over an inner type and use setter functions that throw errors on invalid values. Personally I prefer this over attributes because it forces you to handle possible error states from the callers of the setters, instead of relying on you remembering to call `validate` on your types.

### [WalterBright](<https://news.ycombinator.com/item?id=49772177>)

> There's a large black zig-zag blocking reading the text.

---

## Cite

- Page: https://zeli.app/story/49771873
- Date: 2026-09-20
- Source: nyr24.github.io (https://nyr24.github.io/blog/reflection-comparison/)
- Hacker News: https://news.ycombinator.com/item?id=49771873

## Other languages

- zh: https://zeli.app/zh/story/49771873 · markdown: https://zeli.app/zh/story/49771873.md
- ja: https://zeli.app/ja/story/49771873 · markdown: https://zeli.app/ja/story/49771873.md
- ko: https://zeli.app/ko/story/49771873 · markdown: https://zeli.app/ko/story/49771873.md
- de: https://zeli.app/de/story/49771873 · markdown: https://zeli.app/de/story/49771873.md
- es: https://zeli.app/es/story/49771873 · markdown: https://zeli.app/es/story/49771873.md
- ru: https://zeli.app/ru/story/49771873 · markdown: https://zeli.app/ru/story/49771873.md
