You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that Core is a keyword, we can support both a package named Core and a package named r#Core in the same program, and these would be distinct packages. Should this be permitted?
Details:
In favor of permitting it:
If we later add a new special package name, the r# form would allow existing colliding packages to retain their names. This might be a concern for special package names such a C or Rust.
In favor of disallowing it:
Avoids confusion about which package Core is meant.
Avoids the need to distinguish between package Core and package r#Core in name mangling etc.
Any other information that you want to share?
No response
The text was updated successfully, but these errors were encountered:
My reading of #4864 was that the goal was specifically to not claim any realestate from developers and allow them to use any word in their own programs. By using builtins, it allows the r# form to always be used instead. It seems at odds with that to not allow packages named r#Core but also it could be confusing - and we could say that we allow other things named r#Core just not packages. Are packages special in this way? Because there's no packages in C++ or some other reason? Or Is Core special?
Change representation of package names from `IdentifierId` to
`PackageNameId`, and add a special value `PackageNameId::Core` for the
Core package. Add a `Core` expression to name the Core package, and
support for parsing the `Core` keyword in `package` and `import`
declarations.
For now, I've made no changes to instruction fingerprinting or name
mangling. This means that fingerprints and mangled names will collide
between names in the `Core` package and names in a `r#Core` package. See
#4908.
---------
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
Summary of issue:
Now that
Core
is a keyword, we can support both a package namedCore
and a package namedr#Core
in the same program, and these would be distinct packages. Should this be permitted?Details:
In favor of permitting it:
r#
form would allow existing colliding packages to retain their names. This might be a concern for special package names such aC
orRust
.In favor of disallowing it:
Core
is meant.Core
and packager#Core
in name mangling etc.Any other information that you want to share?
No response
The text was updated successfully, but these errors were encountered: