workflow-swift
workflow-swift copied to clipboard
WIP UI Observation with typed events
Compare with https://github.com/square/workflow-swift/pull/208 and https://github.com/square/workflow-swift/pull/210
Pros
- More concise observer protocol definition
- Easily portable to other observation systems (ex. FRP frameworks) by passing the types through
- Can easily be extended / customized to support listening to only a single event type
- Adding fields to an existing event is backwards compatible
- Adding new events is backwards compatible
Cons
- No way to pattern match over a concrete list of possible events
- Adding a new case to the enum is backwards incompatible
- Does not match existing observation APIs for
Workflow