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

WIP: Add Stack #4112

Draft
wants to merge 3 commits into
base: series/3.x
Choose a base branch
from
Draft

WIP: Add Stack #4112

wants to merge 3 commits into from

Conversation

BalmungSan
Copy link
Contributor

  • Interface
  • Docs
  • Tests
  • Implementation

@reardonj
Copy link

reardonj commented Aug 4, 2024

Queue, PQueue and Dequeue are split into Source/Sink interfaces to allow for Functor and Contravariant interfaces. This should probably have the same treatment?

@BalmungSan
Copy link
Contributor Author

Queue, PQueue and Dequeue are split into Source/Sink interfaces to allow for Functor and Contravariant interfaces. This should probably have the same treatment?

I thought about doing something like that, but TBH, not sure if it is really worth the effort.
IIRC, there is a general idea that the split of Queue didn't help that much, but I could be wrong.

Personally, I think that if you want to hide part of the interface and add extra functionality like map, that is better done in userland with a custom capability that encapsulates the Queue / Stack.

But, would love to hear what others think.

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