In this case, would you consider the following variation wise or unwise (or “just depends”)?
const Allocators = struct {
request: Allocator,
state: Allocator,
scratch: Allocator,
};
fn handle(request: *Request, allocators: Allocators) Response {
const foo = allocators.scratch.alloc(u8, 64); // for my sort....
// ....
}
(A “just depends” answer might be offered like: “if there are lots of handle_X() variations, and they follow this pattern, then this can be a useful construct”… but I’m looking more for reflection on the naming - instead of the names “arena” and “gpa”, here, we have a proposition that might be considered even more specific, or “suggestive” - that’s good, right? Drawbacks?)