StoredPropertyIterable

Thanks for the info! It sounds like supporting var allNamedKeyPaths: [String: PartialKeyPath<T>] shouldn't be too much additional work after reimplementing var allKeyPaths: [PartialKeyPath<T>] using runtime metadata.

Minor: I suspect var allNamedKeyPaths: KeyValuePairs<String, PartialKeyPath<T>> is more desirable to preserve ordering of properties/elements.

I'd also like to reiterate that "getting property/element name from key path" is probably the most hotly-requested extension to KeyPathIterable! The common impression seems to be that "getting string names from key paths is generally impossible" ([1], [2]) - jointly iterating over names and key paths is a clever workaround. This feature would've personally saved me a few hours from debugging an incorrect key path - the error would've been obvious if I could just print the key path name.

2 Likes