However, when the subscript argument is borrowing or inout, the argument must remain fixed for the duration of the call to doSomething(on:), so that the same index value is provided to both the get and the set.
This suggests the lifetime of a borrow or mutate result can depend on the lifetime of an argument. Can the lifetime of a get result depend on the lifetime of an argument, as it can for a method?
I have read the explanation in the proposal, but I don't quite understand why borrow is OK but get isn't. IIUC borrow is about the value (not the parameter) and there is nothing to prevent it from consuming the parameter in its semantics. Could you elaborate a bit?
EDIT: If the approach is to apply borrow accessor to the parameter too, then we'll have trouble in explaining why get/set accessor works with a borrowing parameter.