Supporting mutating getters would require a combinatorial explosion of key-path types for very little gain. We currently have five key path types: AnyKeyPath (immutable, fully type-erased), PartialKeyPath (immutable, type-erased value), KeyPath (immutable), WritableKeyPath (mutable, mutating setter), and ReferenceWritableKeyPath (mutable, non-mutating setter). To support mutating getters we would need to double this (with the possible exception of AnyKeyPath). It's a corner case that clearly doesn't justify the increase in complexity.
1 Like