-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove weak
alias terminology
#140249
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
base: master
Are you sure you want to change the base?
Remove weak
alias terminology
#140249
Conversation
Some changes occurred in src/tools/clippy cc @rust-lang/clippy changes to the core type system changes to the core type system HIR ty lowering was modified cc @fmease Some changes occurred to the CTFE machinery |
d095938
to
56d0c1c
Compare
I tried to just grep for |
Right. My assumption was that we would want to differentiate from strong type aliases that other languages have. The rename seems fine to me tho, I find it unlikely we'll ever have strong type aliases |
That distinction would be meaningful for all of our alias kinds right? Like |
This comment has been minimized.
This comment has been minimized.
56d0c1c
to
bdfeb8f
Compare
I don't think strong aliases make sense as sth for inherent or associated types. Strong aliases would be more like an adt that has its trait impls inferred from its aliased type. I have not seen any design for that which would work in Rust. I think the newtype pattern is more effective as it gives all the control and none of the issues, albeit requiring manual trait impls. |
using free alias seems clearer to me, so 👍 |
@bors r+ |
…ogy, r=oli-obk Remove `weak` alias terminology I find the "weak" alias terminology to be quite confusing. It implies the existence of "strong" aliases (which do not exist) and I'm not really sure what about weak aliases is "weak". I much prefer "free alias" as the term. I think it's much more obvious what it means as "free function" is a well defined term that already exists in rust. It's also a little confusing given "weak alias" is already a term in linker/codegen spaces which are part of the compiler too. Though I'm not particularly worried about that as it's usually very obvious if you're talking about the type system or not lol. I'm also currently trying to write documentation about aliases and it's somewhat awkward/confusing to be talking about *weak* aliases, when I'm not really sure what the basis for that as the term actually *is*. I would also be happy to just find out there's a nice meaning behind calling them "weak" aliases :-) r? `@oli-obk` maybe we want a types MCP to decide on a specific naming here? or maybe we think its just too late to go back on this naming decision ^^'
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#140056 (Fix a wrong error message in 2024 edition) - rust-lang#140220 (Fix detection of main function if there are expressions around it) - rust-lang#140249 (Remove `weak` alias terminology) - rust-lang#140316 (Introduce `BoxMarker` to improve pretty-printing correctness) - rust-lang#140347 (ci: clean more disk space in codebuild) - rust-lang#140349 (ci: use aws codebuild for the `dist-x86_64-linux` job) - rust-lang#140379 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#140056 (Fix a wrong error message in 2024 edition) - rust-lang#140220 (Fix detection of main function if there are expressions around it) - rust-lang#140249 (Remove `weak` alias terminology) - rust-lang#140316 (Introduce `BoxMarker` to improve pretty-printing correctness) - rust-lang#140347 (ci: clean more disk space in codebuild) - rust-lang#140349 (ci: use aws codebuild for the `dist-x86_64-linux` job) - rust-lang#140379 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
I find the "weak" alias terminology to be quite confusing. It implies the existence of "strong" aliases (which do not exist) and I'm not really sure what about weak aliases is "weak". I much prefer "free alias" as the term. I think it's much more obvious what it means as "free function" is a well defined term that already exists in rust.
It's also a little confusing given "weak alias" is already a term in linker/codegen spaces which are part of the compiler too. Though I'm not particularly worried about that as it's usually very obvious if you're talking about the type system or not lol. I'm also currently trying to write documentation about aliases and it's somewhat awkward/confusing to be talking about weak aliases, when I'm not really sure what the basis for that as the term actually is.
I would also be happy to just find out there's a nice meaning behind calling them "weak" aliases :-)
r? @oli-obk
maybe we want a types MCP to decide on a specific naming here? or maybe we think its just too late to go back on this naming decision ^^'