Preparing the iteration ABI for move-only types

.first is one of the dubious customization points that probably should be dropped.

Would it make a difference if it were a set as well as a get computed property? That's been considered in the past as separately useful. Then maybe getting it for a move-only collection could also use the set part to consume the collection.

I guess this would need to be converted to return Element?, with nil for nothing displaced.

1 Like