Pre-RFC: variadic tuple

Because tuples are heterogeneous, we could only iterate over an Iterator<Item = &dyn T> or Iterator<Item = Box<dyn T>.

I think the best way forward (without breaking backwards compatibility) is with a built-in macro:

repeat!(member in tuple {
    member.hash(state);
});

This macro could even build a new variadic tuple with the same arity.

1 Like