Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?".



Yep! 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.


I 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.


Zig does not have varargs. They were removed in favor of anonymous structs/tuples. See https://github.com/ziglang/zig/issues/208#issuecomment-39377....


I'm not the creator of zig! Thank you for your advice.

Zig does not support varargs, except when calling C functions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: