Skip to content

Rename BindableState to BindingState #1855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Rename BindableState to BindingState #1855

merged 1 commit into from
Jan 20, 2023

Conversation

stephencelis
Copy link
Member

The -able naming evokes protocols in Swift, and is an outlier when considered alongside the rest of TCA's binding tools:

  • BindingAction: concrete type
  • BindableAction: protocol
  • BindingReducer: concrete type

So, let's make things consistent and rename @BindableState to @BindingState.

The one caveat is that Swift diagnostics for such a deprecation aren't great, so users won't get proactive warnings here for the time being:

swiftlang/swift#63139

We may just want to keep the deprecation around till it does...

The -`able` naming evokes protocols in Swift, and is an outlier when
considered alongside the rest of TCA's binding tools:

- `BindingAction`: concrete type
- `BindableAction`: protocol
- `BindingReducer`: concrete type

So, let's make things consistent.

The one caveat is that Swift diagnostics for such a deprecation aren't
great, so users won't get proactive warnings here for the time being:

swiftlang/swift#63139

We may just want to keep the deprecation around till it does...
@iampatbrown
Copy link
Contributor

We may just want to keep the deprecation around till it does...

@stephencelis was there a plan on using BindableState as a protocol in the future?

@stephencelis
Copy link
Member Author

@iampatbrown There have been experiments run by @tgrapperon for such a thing, so it'd be nice to free up the namespace if we need it. No concrete plans as of yet, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants