2 ms·
No allocations? So you can't do string formatting? Or is that a special case that is somehow supported?
by panzi 4y ago
No allocations? So you can't do string formatting? Or is that a special case that is somehow supported?
- Zen1th 4y agoYou can string format using `std.fmt.comptimePrint`[1]. For example, combined with features like `@compileError`[2], it allows you to make your own error messages (useful for generic functions) [1]: https://ziglang.org/documentation/master/std/#root;fmt.comptimePrint https://ziglang.org/documentation/master/std/#root;fmt.compt... [2]: https://ziglang.org/documentation/master/#compileError https://ziglang.org/documentation/master/#compileError