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

Rename "anonymized types" internally (TyAnon & friends) to "opaque types" (TyOpaque etc.). #53576

Closed
eddyb opened this issue Aug 21, 2018 · 8 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@eddyb
Copy link
Member

eddyb commented Aug 21, 2018

Now that we're settling on "static existentials" for the generalized version of -> impl Trait, I think it's time to retire my original nomenclature and use the official(?) one uniformly in the compiler.

EDIT: going with "opaque", see below.

cc @cramertj @oli-obk @aturon @Centril

@eddyb eddyb added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. C-cleanup Category: PRs that clean code up or issues documenting cleanup. labels Aug 21, 2018
@eddyb
Copy link
Member Author

eddyb commented Aug 21, 2018

Alternatively, since @varkor protests, I'd be fine with TySome and "some type" in error messages (okay maybe it's just that I find this part amusing).

EDIT: going with "opaque", see below.

@ms2300
Copy link
Contributor

ms2300 commented Aug 21, 2018

@eddyb Can I take this ticket on? As it'd be the first ticket I'd take here is there anything I should know beyond the contributing.md?

@eddyb
Copy link
Member Author

eddyb commented Aug 21, 2018

@varkor wants it to be TyOpaque, so maybe we should do that instead instead of my half-baked ideas.

@ms2300 Seems good! Searching for Anon and anon should find you all of the relevant places in the codebase (you can ignore AnonConst - if you see more that you're not sure about, feel free to ask).

@Centril
Copy link
Contributor

Centril commented Aug 21, 2018

I, like @varkor, would be most happy with TyOpaque instead of vocabulary reminiscent of existential types (e.g. TySome, TyExists, ..)

@ms2300
Copy link
Contributor

ms2300 commented Aug 21, 2018

Sounds good, I'll let you all know if I have more questions

@eddyb eddyb changed the title Rename "anonymized types" internally (TyAnon & friends) to "existential types" (TyExists etc.). Rename "anonymized types" internally (TyAnon & friends) to "opaque types" (TyOpaque etc.). Aug 22, 2018
@ms2300
Copy link
Contributor

ms2300 commented Aug 23, 2018

So I'm looking into it and AnonConst, AnonPipe, LateBoundAnon, BrAnon, and Anon (in the FileName sense) don't need to be changed right? Really all that needs to be changed is the internal type of Anon -> Opaque which used to be TyAnon correct?

Edit: and corresponding filenames

@varkor
Copy link
Member

varkor commented Aug 23, 2018

So I'm looking into it and AnonConst, AnonPipe, LateBoundAnon, BrAnon, and Anon (in the FileName sense) don't need to be changed right?

That's right.

Really all that needs to be changed is the internal type of Anon -> Opaque which used to be TyAnon correct?

Yes, and anything that might refer to TyAnon as an "anonymous type" (for example in error messages or diagnostics), as well as variable and function names, such as anything containing anon_ty, or mk_anon, etc. It's quite hard to find all of these, but if you search for anon (case insensitive, but possibly mid-word), you should find most of them.

@ms2300
Copy link
Contributor

ms2300 commented Aug 25, 2018

I just opened a pr to fix this issue -> #53705

bors added a commit that referenced this issue Sep 6, 2018
#53576 Renaming TyAnon -> TyOpaque

Fixes #53576
kennytm added a commit to kennytm/rust that referenced this issue Sep 7, 2018
bors added a commit that referenced this issue Sep 8, 2018
#53576 Renaming TyAnon -> TyOpaque

Fixes #53576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants