-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
#76460 experimented with this, but it was never finished. We should figure out whether we actually want this
Pros:
&stris nicer to work with thanSymbolStr, e.g. avoids the need for some&and&*occurrences.- It would be nice to eliminate
SymbolStr. - It avoids the lie that
SymbolStrstrings have astaticlifetime, replacing it with a smaller lie that the strings have a lifetime tied to the lifetime of the inputSymbol.
Cons:
- That lifetime is still a lie, and it's possible to cause crashes with this.
- The lie is less obvious in a vanilla
&strthan it is within aSymbolStr. - We can't mark
&stras!Sendand!Sync.- this may be why
SymbolStr(or what it was called previously) was introduced in the first place, because Zoxc did it together with the work on compiler parallelization.
- this may be why
- I haven't yet eliminated
SymbolStrentirely. Theto_stable_hash_key()is the hardest case.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.