Hey,
Wondering about thoughts on the following
function _tuple() internal pure returns (uint, uint) {
return (1, 1);
}
function outer() internal pure {
// valid
(uint a, uint b) = _tuple();
// valid
uint c; uint d;
(c, d) = _tuple();
// invalid
uint e;
(e, uint f) = tuple();
}
Looks to me like tuples require destructing all elements either into predefined variables, or require inline declarations for all elements.
I understand there might be practical reasons for this, and would be interested to hear them. I was expecting to be able to “mix and match” between previously declared variables and newly declared variables.
Would be interested to hear if this would be a useful change or if there are major technical hurdles behind implementing something like this?