3 ms·
To allow for multiple substitutions to be done the same way.
by zamadatix 6y ago
To allow for multiple substitutions to be done the same way.
- hota_mazi 6y agoSorry but that doesn't explain anything. Why is just "x" not allowed? What does ".{x}" actually mean?
- flohofwoe 6y ago.{ 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 https://ziglang.org/documentation/master/#comptime The end of the comptime section also explains how string formatting works that way.