Skip to content

provide detailed documentation of entry API #17609

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

Closed
wants to merge 1 commit into from

Conversation

Gankra
Copy link
Contributor

@Gankra Gankra commented Sep 28, 2014

Also added some re-exports that were missing from btree that this exposed.

@alexcrichton
Copy link
Member

It seems unfortunate to duplicate the documentation across these two functions, perhaps the philosophy behind the Entry-based API could be outlined in std::collections documentation and these two functions could refer to that? The idea is to expand this API to more collections, right?

@Gankra
Copy link
Contributor Author

Gankra commented Sep 28, 2014

@alexcrichton Yeah, I wasn't sure on this. Where would it go in collections?

One possibility is to make the Entry enum generic and part of libcollections, and have each Map share it. Then the docs could reasonably go there?

This will also be a problem when we start axing the collection traits. So maybe we need to figure out a more robust solution for this.

@alexcrichton
Copy link
Member

Hm, I was thinking of perhaps the module documentation for std::collections, but that's also a bit of an odd place. Another option would possibly be just linking the btree documentation for entry to the hashmap documentation for entry?

@Gankra
Copy link
Contributor Author

Gankra commented Sep 28, 2014

cc @steveklabnik @aturon

@aturon
Copy link
Member

aturon commented Sep 29, 2014

Yeah, this is one of the downsides of not using traits for common interfaces (which of course we want to eventually).

Personally, I like the idea of beefing up the docs for std::collections -- we can incorporate whatever conventions and patterns come out of collections reform/stabilization, as well as the Entry API. The doc comments on the Entry types and individual entry methods can then be kept short, with a pointer to the main doc.

@Gankra
Copy link
Contributor Author

Gankra commented Sep 29, 2014

@aturon So you would just have it floating loose on this page? http://doc.rust-lang.org/std/collections/

@aturon
Copy link
Member

aturon commented Sep 29, 2014

@gankro Yes, exactly. Right now there's literally no documentation for this module, and I think it would be great to instead provide an overview of the APIs, including Entry. (This would be a good place for the performance overview to go, for example.)

@Gankra
Copy link
Contributor Author

Gankra commented Sep 29, 2014

@aturon Yes, but I remember we nixed doing that for... a reason. What were we waiting for? Stabalization?

@aturon
Copy link
Member

aturon commented Sep 29, 2014

@gankro I think the hesitation before was mainly that it didn't make sense to land just the performance overview, without a more general overview of the API surface. (This was aside from issues about the perf stuff being too much of a tutorial on asymptotics.)

Anyway, it would be really great to start work on a solid overview of the collections, both in terms of the concrete collections and their tradeoffs, and in terms of the most significant APIs/conventions. Might be good to coordinate with @steveklabnik. Is that something you'd be interested in working on?

@Gankra
Copy link
Contributor Author

Gankra commented Oct 5, 2014

Closing in favour of #17802

@Gankra Gankra closed this Oct 5, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jul 28, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Aug 1, 2024
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.

3 participants