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
Labels

Comments

@alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Feb 20, 2015

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

This comment has been minimized.

Copy link
Contributor

@brson 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

This comment has been minimized.

Copy link
Contributor

@brson brson commented Feb 20, 2015

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

@reem

This comment has been minimized.

Copy link
Contributor

@reem reem commented Feb 20, 2015

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

@pnkfelix

This comment has been minimized.

Copy link
Member

@pnkfelix pnkfelix commented Feb 26, 2015

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

@pnkfelix pnkfelix closed this Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.