Skip to content
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

Add CasePathIterable and CasePathReflectable protocols #173

Merged
merged 4 commits into from
Jul 12, 2024

Conversation

stephencelis
Copy link
Member

While the macro recently introduced iteration (#159) and "reflection" (#158), there's no way to abstract over it. Adding it directly to the CasePathable protocol would be potentially source breaking, so instead we can introduce some new protocols.

While the macro recently introduced iteration (#159) and "reflection"
(#158), there's no way to abstract over it. Adding it directly to the
`CasePathable` protocol would be potentially source breaking, so instead
we can introduce some new protocols.
@stephencelis stephencelis marked this pull request as ready for review June 21, 2024 16:20
@stephencelis
Copy link
Member Author

@mbrandonw I think this is ready to go. The main thing is if we're happy with the naming. CasePathIterable seems non-controversial, but the CasePathReflectable naming may be a little strange given that it's defined on the AllCasePaths type. One might assume/consider that the root enum is the "reflectable" type, and the AllCasePaths is just doing the reflecting...so is there a better name? CasePathReflecting maybe? Though I can't think of any protocols with an "-ing" suffix off the top of my head.

@stephencelis stephencelis merged commit b9ad266 into main Jul 12, 2024
2 checks passed
@stephencelis stephencelis deleted the case-path-iterable branch July 12, 2024 20:04
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.

2 participants