#default arguments in zig?
1 messages · Page 1 of 1 (latest)
but you can use structs with default field values to supplement this where appropriate
e.g.
fn foo(args: struct { bar: u32 = 0 }) void {}
ye, you could do if (@typeInfo(@TypeOf(x)) == .Int)
dunno what that has to do with default args though
is there something specific you're trying to do?
trying to learn zig