3 ms·
Chaining this much is not really recommended in Zig. An idiomatic implementation of that stuff would not allow you to chain this much. Additionally, in Zig tem
by kristoff_it 4y ago
Chaining this much is not really recommended in Zig. An idiomatic implementation of that stuff would not allow you to chain this much.
Additionally, in Zig temporaries (which you would be implicitly constructing by chaining) are immutable, meaning that a chain of calls would only compile as long as it doesn't try to mutate any intermediate value (which is a nice protection against footguns).
But really, this is a coding style that's considered fine in Rust, not in Zig.