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

Type macros may follow a different naming convention #145

Open
dtolnay opened this issue Nov 11, 2017 · 9 comments
Open

Type macros may follow a different naming convention #145

dtolnay opened this issue Nov 11, 2017 · 9 comments
Labels
amendment Amendments to existing guidelines disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. T-libs Relevant to the libraries subteam, which will review and decide on the PR/issue.

Comments

@dtolnay
Copy link
Member

dtolnay commented Nov 11, 2017

#135 (comment) suggests a nice one:

I've been using PascalCase! for macros that expand into types. (e.g. Array![i32; 5; 4; 3] which expands into [[[i32; 3]; 4]; 5])

I did not consider type macros when adding a case convention for macros in C-CASE. I have also never used a type macro myself. Will need to survey the ecosystem and see whether PascalCase! for type macros would be a good recommendation.

@KodrAus
Copy link
Contributor

KodrAus commented Dec 22, 2020

This seems like an amendment we'd want to make now. In the intervening years I think PascalCase has emerged as a standard for type macros (like syn::Token!).

@KodrAus KodrAus added amendment Amendments to existing guidelines I-nominated Indicates that an issue has been nominated for discussion during a team meeting. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. and removed I-nominated Indicates that an issue has been nominated for discussion during a team meeting. labels Dec 22, 2020
@KodrAus

This comment has been minimized.

@KodrAus KodrAus added the T-libs Relevant to the libraries subteam, which will review and decide on the PR/issue. label Dec 22, 2020
@KodrAus
Copy link
Contributor

KodrAus commented Dec 22, 2020

@rfcbot fcp merge

This proposes amending our naming conventions to recommend type macros use PascalCase naming instead of snake_case.

@rfcbot
Copy link

rfcbot commented Dec 22, 2020

Team member @KodrAus has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@CodesInChaos
Copy link

Are there any type macros in the standard library already?

@PlasmaPower

This comment has been minimized.

@sfackler

This comment has been minimized.

@rfcbot
Copy link

rfcbot commented Dec 31, 2020

🔔 This is now entering its final comment period, as per the review above. 🔔

psst @KodrAus, I wasn't able to add the final-comment-period label, please do so.

@rfcbot
Copy link

rfcbot commented Jan 10, 2021

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

psst @KodrAus, I wasn't able to add the finished-final-comment-period label, please do so.

@KodrAus KodrAus added the finished-final-comment-period The final comment period is finished for this PR / Issue. label Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amendment Amendments to existing guidelines disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. T-libs Relevant to the libraries subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants