workflow-swift icon indicating copy to clipboard operation
workflow-swift copied to clipboard

WIP WorkflowUI observation with delegate methods

Open amorde opened this issue 1 year ago • 0 comments

Compare with https://github.com/square/workflow-swift/pull/209 and https://github.com/square/workflow-swift/pull/210

Pros

  • Matches existing APIs for Workflow observation
  • Adding new events is mostly backwards compatible (via default implementation in protocol extension)

Cons

  • Verbose definition & implementation
  • No way to pattern match over a concrete list of possible events
  • Slightly cumbersome to port to another observation system (ex. FRP frameworks) as it would require re-defining the data in a tuple or a custom type

amorde avatar May 10 '23 23:05 amorde