4 ms·
Does this mean that "print" only takes two arguments, and the second argument has to be an array? This is the kind of information that your tutorial needs to c
by hota_mazi 6y ago
Does this mean that "print" only takes two arguments, and the second argument has to be an array?
This is the kind of information that your tutorial needs to contain, because it's radically different from C and other languages, and this is exactly the kind of information that readers will be looking for: "How different is Zig from C and why should I care?".
- dnautics 6y agoYep! The document has now been updated. I might have been blind to it because my daily driver is Elixir, and it does "basically the same thing" with keyword arguments.
- hota_mazi 6y agoI totally understand why being immersed in something might make you lose perspective, but keeping this perspective is what differentiates a decent language designer from a great one. Does this mean that zig doesn't support varargs? If not, why not? Again, another question that a lot of people coming to your page will be asking themselves, please don't take that as a criticism, just candid feedback to help you make your article better.
- dnautics 6y agoI'm not the creator of zig! Thank you for your advice. Zig does not support varargs, except when calling C functions.
- edflsafoiewq 6y agoZig does not have varargs. They were removed in favor of anonymous structs/tuples. See https://github.com/ziglang/zig/issues/208#issuecomment-393777148 https://github.com/ziglang/zig/issues/208#issuecomment-39377....