New Issue: [Patterns] should it be possible to specify the locality of a distributed map's keys using a distributed set?

18964, "lydia-duncan", "[Patterns] should it be possible to specify the locality of a distributed map's keys using a distributed set?", "2022-01-11T23:14:12Z"

This issue is part of a series of issues to design the interface for collections across serial, parallel, and distributed contexts. Our goal is to determine what we think is reasonable to support and what doesn't seem useful. Additional patterns welcome (but it would be best to put them in their own issue for discussion, likely)

var s = new DistributedSet(...);
...
var m = new DistributedMap(...);
coforall loc in s.locales {
  on loc {
    var localKeys = s.getLocalKeys();
    forall k in localKeys {
       // Would map determine where the key should live based on where the key is first given a value?
       // Or should the map have to do something special to ensure it is placed on that locale?
       // Should the user have control over it at all?
       // Should there be a way to add the entire set with their locales to be used as the keys in one go?
      m.add(k, someVal);
    }
  }
}