5 ms·
fn reticulate2(splines2: anytype) void {} The compiler would ducktype splines2 and everything would work fine.
by AnIdiotOnTheNet 4y ago
fn reticulate2(splines2: anytype) void {}
The compiler would ducktype splines2 and everything would work fine.
- Arnavion 4y agoYou lose a lot of type safety by making the whole parameter `anytype`. If Zig supported `ArrayList2(u8, anytype)` that would be marginally better, but it doesn't.
- throwawaymaths 4y ago> You lose a lot of type safety by making the whole parameter `anytype`. Pretty sure that's not the case. You can also put further compile time type assertions downstream of the function head. > If Zig supported I believe the argument of the thread is that it should support that.