Why aren't tuples as return values used as much?

The pattern of returning tuples as a way to convey “the callee thinks the caller should use all of these values” is the same pattern I was toying with as an alternative Allocator interface here. My example in that thread doesn’t work exactly as I described it (since there are no closures in Zig :face_with_tongue:), but I still think the idea is generally interesting, and I think using tuples to convey “all these values should be used” is a good idea.

4 Likes