Skip to content

Removed bounds on Append, PluckTail, Prepend, and Pluck. #7

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thorjelly
Copy link

While I completely agree with the stated goal of making <() as Append<T>>::Output = (T,), I feel PR #6 introduced overly restrictive and unnecessary bounds.

This has come up for me because I found it necessary to implement my own Empty types, and I still want to be able to append them and output a tuple. But the bound on Append::Output makes it impossible to implement that, because I cannot implement PluckTail a second time on (T,).

I am unsure why these bounds were necessary for the stated goal. ().append(x).pluck_tail() is completely backwards compatible without them with the other changes in PR #6. I understand that with a custom empty type it wouldn't be (the sequence would return () instead of the original custom empty), but I find that less of a limitation than not allowing a custom implementation at all, so I feel removing them makes the library more useful.

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.

1 participant