> Zig’s requirement of explicitly passing around an Allocator type removes any ambiguity completely.
Not really...
var list = std.ArrayList(u21).init(std.testing.allocator);
try list.append('a');
Does creating the ArrayList allocate memory?
Is appending to the array list reallocates?
The only thing you know is that ArrayList will sometime use the allocator, you can't tell when.
And this gets worse once the abstraction level increases, if you have your own type which accepts an allocator and has 100 methods it's impossible to tell which methods allocate.In both languages you still need to know the specifics of the data structures you are working with, the only real problem that Zig solves is to actually allow you to use custom allocators with the std collections, which is something that is still unstable in Rust.