I think both.
(lo, hi) = getLim();
It seems to me it would have to be something like: Lim lim = getLim();
lo = lim.minimum;
hi = lim.maximum
Pwrhaps records could define an ordering of their fields, so as to enable destructuring by position?Yeah, this in JS:
obj = {a: 1, b: 22, c: 333}
const {b, a} = obj
My original point was more that, even in languages that have both "proper" traditional tuple types and the parenthesised destructuring syntax, we're not obligated to use destructuring. i.e. writing the following is perfectly legitimate, if verbose: a_tup = function_returning_tuple()
x = first(a_tup)
y = second(a_tup) lim = getLim();
const {minimum: lo, maximum: hi} = lim;