>>105868996>>105869019i should have worded it differently, i meant that stdout for the main output of your program that is meant to be piped to a file or a different program, which can be plaintext or binary
your program should not write diagnostic messages to stdout, that's what you have stderr for. almost every language in existence gets that wrong and makes the standard "printf" function write to stdout, when the vast majority of uses of printf is for logging and diagnostics. zig fixes this by making the common use case (printing diagnostics) easy to reach for and the less common (printing a pipeable result) slightly more explicit and verbose
>and formatters should work with all IOthey do in zig, you just have to explicitly get a handle to stdout first
// stderr
std.debug.print("faggot\n", .{});
// stdout
var bw = std.io.bufferedWriter(std.io.getStdOut().writer())
try bw.print("faggot\n", .{});
try bw.flush();