Union splitting vs C++

But is there is important reason for this iteration for x in v be implemented in a way that cannot be a simplified version of for (i,x) in pairs(v)?