News for hackers. Stuff that matters.
Re:Zig in 30 Minutes by hota_mazi on Sunday January 03, 2021 @01:53AM (#25620093)
Sorry but that doesn't explain anything.

Why is just "x" not allowed? What does ".{x}" actually mean?

Re:Zig in 30 Minutes by flohofwoe on Sunday January 03, 2021 @05:35AM (#25620956)
.{ x } or .{ x, y, z } etc... are adhoc-constructed anonymous struct-values which can be inspected at compile time by the standard library's string formatting code.

It all makes a lot more sense after understanding Zig's comptime features:

https://ziglang.org/documentation/master/#comptime

The end of the comptime section also explains how string formatting works that way.