also why ask for a parameter when it is not needed? print vs printf in C
Consider the above code without it:
std.debug.print("hello world!\n", struct{}{});
std.debug.print("{}!\n", struct{string: []const u8}{ .string = "hello world"});
It's compile-time checked. The example shows a compile time error when the struct fields are not completed by the anonymous struct
Consider the above code without it:
Now add a value: Quite unwieldy. Zig used to have variadic functions and it was difficult to work with, complicated metaprogramming, and made how things work less obvious during reading. It was also pretty much only ever used for the "print" function.