-
Notifications
You must be signed in to change notification settings - Fork 23
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
An associative containers in which both types can be used as key. #238
Comments
I think @Araq already implemented a BiTable, forgot where it was though |
@Yardanico @zedeus Unfortunately this container implementation is not generic enough for the most use cases. It seems like something written specifically for a use case inside Nim's compiler.
On a good side it is more efficient than mine which is just a thin wrapper around two I don't know @Araq's intentions and whether he plans to make it more generic and to put it into the standard library, but if he has such plans it can be a better alternative than my version. |
(this is not an argument against a generic bitable)
the counterpoint of |
The compiler's hash tables have no known bugs and we can refactor them whenever we want to. Or never. I don't understand why you're pushing for this. |
This RFC is stale because it has been open for 1095 days with no activity. Contribute a fix or comment on the issue, or it will be closed in 7 days. |
No, we really need this. |
In the standard library? Why? |
In some situations there is a need for an associative container in which both types can be used as key, similar to Boost.Bimap for C++. I have such an implementation called BiTable for the project I'm working on and I'm wondering whether there is an interest for something similar in the standard library. If so and if the proposed implementation is considered good enough I will write documentation for it and I will make a pull request.
The interface is based on both
Boost.Bimap
(leftView
andrightView
procedures) and Nim's standard librarytables
module.The text was updated successfully, but these errors were encountered: