I found out that zig doesnt take language proposals on github anymore so i'm posting this here because i wonder what people think :D
Random idea: replace anytype with functions that imperatively check for type conformance?
instead of
fn foo(sink: anytype) void { ... }
it would be
fn foo(sink: isWriter) void { ... }
where
fn isWriter(comptime t: type) void {
if (!std.meta.hasFn("write")(t)) @compileErorr(...);
}
I dont think it makes currently sense to use a function name in place of function argument?