6 ms·
In Zig, function arguments are not wrapped in `.{}`. `.{}` is the syntax for creating a struct or a tuple. This is used as a pattern for allowing optional argum
by brodo 3mo ago
In Zig, function arguments are not wrapped in `.{}`. `.{}` is the syntax for creating a struct or a tuple. This is used as a pattern for allowing optional arguments (options struct) and variadic functions (tuple).
Explicitly discarding return values is a thing many modern programming languages force you to do.
- stephc_int13 3mo agoI know, and I don't see unused return values as an error, it should be a warning at best. And the compiler should be just a bit smarter to avoid the .{} thing when it is not strictly necessary.
- dnautics 3mo ago> And the compiler should be just a bit smarter to avoid the .{} thing when it is not strictly necessary. What's your plan for this? Rebuilding the C varargs mess from first principles?