New Issue: Add support for default map iterator yielding (key,value) pairs

24733, "bradcray", "Add support for default map iterator yielding (key,value) pairs", "2024-03-29T23:54:06Z"

While working on updating CLBG codes for Chapel 2.0, one of the rewrites was to change:

for (k,v) in freqs.items() do ...

into:

for (k,v) in zip(freqs.keys(), freqs.values()) do ...

in order to avoid the deprecation warning for the items() iterator. This issue captures the desire to reinstate such a (key,value)-yielding iterator on maps, and to make it the default iterator for maps as proposed in What should `map.these()` yield? · Issue #14718 · chapel-lang/chapel · GitHub to permit the above to be written as:

for (k,v) in freqs do ...

My understanding is that an aspect of the language or implementation relating to tuples and their ref-ness vs. copy behavior is what led us to deprecate these, and I understand that, but I think we're taking a big productivity hit in this area as a result.