-
Notifications
You must be signed in to change notification settings - Fork 151
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
Change name? #14
Comments
Maybe. The main feature is that it has a consistent (iteration) order that does not depend on the keys or the hash function. |
Note that for clarity reasons it did already change name from OrderedMap to OrderMap |
What would you call the "separately named hash map" if this one is still called OrderMap ? |
Renaming the crate seems prudent; the name is the first impression we have, and there we need to deliver the correct expectations about what the data structure does. NOTE: This is the name for the datastructure in this crate in its current implementation. current OrderMap will change name. The datastructure is a hash table, stored in a compact indexable range, where it keeps insertion order as long as you don't call Name Alternatives:
I prefer LinearMap because its succinct, vaguely reminds one of the compactly indexable "Like a Vec" ordering semantics. Thoughts and wo-hoos are welcome. Please leave well thought out alternative names too. Migration will use deprecation with clear message to point to the new crate name, and there will be a migratory crate version that is 100% API compatible with the other. |
Thoughts on new name from @nox @cuviper @igouy @Techcable @pczarn @arthurprs @Binero @garro95 and everyone else!? |
|
IMO: the name of the type can be succinct but the crate's name should be very precise. |
I'm not going for that meaning of "linear" here. We can describe a Vec as linear too, and it is constant time indexable; I think it can work. |
@bluss that would be fine, but |
Aw, that's too bad. |
The reason to rename is so an always-ordered crate can assume the name My next preference is |
The reason is twofold. Most importantly now that ordermap seems to have delivered the wrong expectations. Secondly yes because I think a full insertion order map is important to Rust, to give the name to it. |
For what it's worth, I think @bluss's |
(it wasn't my name, I just picked it from #14 (comment)) |
I like |
|
Although I am nostalgic for |
I appreciate the feedback! Now 😄 I'm sorry to capture you like this (it's entirely voluntary), you who have already commented here or those that happen to read this: co-maintainers are also welcome since a good crate needs shared ownership. Maybe we don't have so much to do? The most important goal is just 1.0, and the name should be the only thing left blocking that.. |
I'm willing to be a co-maintainer. |
Some other names:
I think my vote is Also, I will be adding this to the |
DeterministicMap is a good point, DetMap is not a very understandable shortening, but deterministic is right in the realm of names we have been shooting for (even SteadyMap). Note that the current plan is a common release of version 0.4 of ordermap and indexmap that are API-identical (apart from deprecation in ordermap, and the addition of the renamed types in indexmap). Then shortly after that indexmap can be 1.0. It sounds a bit convoluted but it each step along the plan is simple and actionable. Ideally there should be an indexmap 0.4 that is ready to be rubber stamped as 1.0 soon. |
Just so I understand:
Is that right? |
(It's basically right) The second point is a later concern, since no implementation exists, it will of course be a breaking version upgrade. |
I think |
|
@vitrial this can easily be solved by renaming |
@clarcharr We could of course also remove it completely. |
I don't quite follow why
|
When I think of an In a So, in a The current |
@Binero while I agree with you that is slightly more expected, it has significant performance penalties. In most cases the fact that removing an element can affect the index of other elements is enough. I would go the opposite -- add a In the majority of cases I would expect the performance of |
In case we want to just focus on the fact the collection works like a I'm just not sure if we want such a narrow use-case for the collection while it could easily handle more. |
From discussion in #rust, came the idea that clear docs would be even better than the perfect name. No name can be so specific that it has the full picture in just the name. I might propose |
While I get the motivation, IndexMap still feels way better than SteadyMap (which is essentially arbitrary). |
Something that is fast indexing is pretty much by definition fast at iterating, which is why I think
|
Thanks a lot for being part of the process, |
Just an idle thought -- OrderMap was a good name for something that does guarantee insertion-order-preserved for all operations, so have a new name for this new thing which does not make that guarantee.
Is there a FastMap ? :-)
The text was updated successfully, but these errors were encountered: