A deep dive into how reflection is implemented in a new (then-unnamed) systems programming language, later revealed to be Hare. Covers the user-facing API using a `types` module with `typeinfo` structs and tagged union representations, then explains the internals: `type()` expressions compile to statically allocated typeinfo structures, with built-in types using runtime singletons and named type aliases generating deduplicated globals stripped by the linker via `--gc-sections`. Also previews future utilities like `types::strenum` for converting enum values to strings via reflection.
Table of contents
BackgroundReflection from a user perspectiveReflection internalsFuture improvementsSort: