wwt / SwiftCurrent

A library for managing complex workflows in Swift

Home Page:https://wwt.github.io/SwiftCurrent/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extreme type safety!

Tyler-Keith-Thompson opened this issue · comments

Is your feature request related to a problem? Please describe.

Workflow has some sort of type safety at the moment and that's very helpful. We can take it much, much farther with the notion that compile-time errors are preferred.

Describe the solution you'd like

For example every FlowRepresentable can declare both an Input and Output, then when you create a workflow you can enforce (with a fluent API) that the next thing being presented has the same kind of Input that the last thing outputs.

Describe alternatives you've considered

We could not have type safety and just make everyone deal with "Any" for the rest of their lives, but that seems cruel.

Additional context

It's already done.....mostly.