Skip to content

add string interning wikipedia link #960

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

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ we'll talk about that later.
- The token stream passes through a higher-level lexer located in
[`rustc_parse`] to prepare for the next stage of the compile process. The
[`StringReader`] struct is used at this stage to perform a set of validations
and turn strings into interned symbols (_interning_ is discussed later).
and turn strings into interned symbols (_interning_ is discussed later).
string interning is a method of storing only one copy of each distinct
string value, which must be immutable.
[read more](https://en.wikipedia.org/wiki/String_interning)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string interning is a method of storing only one copy of each distinct
string value, which must be immutable.
[read more](https://en.wikipedia.org/wiki/String_interning)
[String interning] is a way of storing only one immutable copy of each distinct string value.

and then add a reference link at the bottom:

  [String interning]: https://en.wikipedia.org/wiki/String_interning)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't add the reference at the bottom. It should go near the other links.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean add [String interning]: https://en.wikipedia.org/wiki/String_interning) under read more?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put it with the other links for the paragraph: see lines 101-115

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You undid the previous changes when you added the link.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah but now that change is back

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please only show 'string interning' once instead of twice? Right now there are 5 lines related to it, I would rather have 1 line like it was before. Or in other words, my suggestion should replace the first change, not add to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sure

- The lexer has a small interface and doesn't depend directly on the
diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain
data which are emitted in `rustc_parse::lexer::mod` as real diagnostics.
Expand Down