comptime

Tag

Cards List
#comptime

Zig Structs of Arrays (2024)

Hacker News Top · 2026-06-04 Cached

Explains how Zig's comptime and type reflection enable creating struct-of-arrays (SoA) data structures like MultiArrayList, which improve cache performance in high-performance applications.

0 favorites 0 likes
#comptime

Even More Tagged Union Subsets with Comptime

Lobsters Hottest · 2026-05-19 Cached

This article explores using Zig's comptime to create tagged union subsets, inspired by Mitchell Hashimoto's work, and applies the technique to a MyST parser's AST traversal.

0 favorites 0 likes
#comptime

Tagged Union Subsets with Comptime in Zig

Mitchell Hashimoto · 2024-09-23 Cached

Mitchell Hashimoto demonstrates how to use Zig's comptime to create subset types of tagged unions, enabling compile-time safety without exhaustive case handling.

0 favorites 0 likes
#comptime

Conditionally Disabling Code with Comptime in Zig

Mitchell Hashimoto · 2024-09-12 Cached

Mitchell Hashimoto explains how to use Zig's comptime feature to conditionally disable code at compile time, comparing it to approaches in C and Go.

0 favorites 0 likes
← Back to home

Submit Feedback