Swift UI introduces an
Identifiable protocol as well as the related
IdentifierValuePairs types and the
I believe that
Identifiable is a "currency" protocol with relevance to an extremely broad range of Swift code and should therefore be moved into the standard library along with the related types and method. These will be useful to any generic code that works with values that represent a snapshot of the state of an entity.
Related to this topic, there are a couple of symbols we may want to consider moving.
As mentioned in an earlier post, I also believe
StaticMember should be in the standard library if unless we intend to replace it with a language solution.
BindableObject is appropriately placed because SwiftUI's notion of
Binding is tightly tied to the domain of the framework. But a more general notion of
ObservableObject with a
didChange requirement would be very broadly useful. We may want to consider introducing this protocol at a lower level and having
BindableObject refine it.
Finally, the notion of a
Cancellable is broadly applicable to any code that deals with cancellable side effects. This means that
AnyCancellable are also good candidates to be "currency" types. Combine feels like too specific a framework for these symbols.
What does the community think? Should we pull up some of these currency types?