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

Could these containers be polymorphic with MonadRef instead of fixed at STM? #14

Open
3noch opened this issue Dec 16, 2016 · 3 comments

Comments

@3noch
Copy link

3noch commented Dec 16, 2016

@ElvishJerricco pointed out this possibility. What do you think?

@nikita-volkov
Copy link
Owner

I'm rather skeptical, but what would be the use case?

@ElvishJerricco
Copy link

Well the point is that (at least at a hight level), there's no reason that mutable containers should be tied to STM. If I want to use a mutable hashmap from ST so that I can have the most efficient possible algorithm in my pure function, there's no reason it can't be the same hashmap implementation as the one I'd use in STM.

@nikita-volkov
Copy link
Owner

From the abstraction perspective this seems like a good idea. However, generalising it in such a way would complicate the API and what's worse, would make it harder to optimise the algorithm.

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

No branches or pull requests

3 participants