19543, "bradcray", "Should tuples promote?", "2022-03-25T01:40:56Z"
While reviewing New version of nbody by bradcray · Pull Request #19537 · chapel-lang/chapel · GitHub in the performance meeting today, it was noted that if tuples supported promotion, certain idioms could be written more cleanly.
For example, rather than:
for b in bodies do b.pos += dt * b.vel;
for param i in 0..<numBodies do bodies[i].pos += dt * bodies[i].vel;
we could potentially just write:
bodies.pos += dt * bodies.vel;
which seems natural / attractive.