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

Establish conventions for macro internals #22607

Closed
alexcrichton opened this issue Feb 20, 2015 · 4 comments
Closed

Establish conventions for macro internals #22607

alexcrichton opened this issue Feb 20, 2015 · 4 comments

Comments

@alexcrichton
Copy link
Member

We should establish conventions for how to expose the implementation details of macros as parts of the public API of a crate. Currently we have two "schemes"

  • Prefix the name with __ example
  • Liberal use of #[doc(hidden)] example

It would be nice to standardize on the convention here as most of these internals "we'd really rather not expose". I personally like the double-underscore-prefix-plus-#[doc(hidden)] strategy but others may feel differently!

Nominating, this may tidy up some of our apis in std.

@brson
Copy link
Contributor

brson commented Feb 20, 2015

I also think double underscore + doc hidden is the way to go.

This may even call for triple underscore. It's the only way to be sure.

@brson
Copy link
Contributor

brson commented Feb 20, 2015

Actually, a random number of underscores chosen at compile time would probably be more foolproof.

@reem
Copy link
Contributor

reem commented Feb 20, 2015

+1, since other libraries can use the same conventions.

@pnkfelix
Copy link
Member

(wrong spot, @alexcrichton said should be RFC, closing)

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

4 participants