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

Explain what interning means #419

Open
Nashenas88 opened this issue Aug 7, 2019 · 7 comments

Comments

@Nashenas88
Copy link
Contributor

commented Aug 7, 2019

At the bottom of https://rust-lang.github.io/rustc-guide/the-parser.html, the phrase "interns identifiers" is used. But to me, its meaning wasn't clear on first read-through. I checked in Zulip::/t-compiler/help and got back : "It means that you are not creating a heap allocation for an identifier every time, but instead have a global table where they are stored and deduplicated. You then just need to store the index into the global table whenever you have an identifier" from @oli (oliobk?). It would be helpful to have this explained early on (and maybe a link back to the definition in later uses?)

@spastorino

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

I think it would be great to have this explained, perhaps starting with what @oli-obk has mentioned would be great.

@nnethercote

This comment has been minimized.

Copy link

commented Aug 21, 2019

https://en.wikipedia.org/wiki/String_interning could be a useful link.

@feroldi

This comment has been minimized.

Copy link

commented Aug 25, 2019

@eddyb explained quite a bit of it here: feroldi/oxide#1 (comment)

@spastorino

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

@eddyb explanation is great. I think we have more than enough stuff to document now. @Nashenas88 would you like and are able to provide a PR for this?.

@Nashenas88

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

Do you think we should leave this for anyone new to rustc dev? I feel like it'd be a great introductory issue for someone to work on.

@spastorino

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

@Nashenas88 as you wish :)

@mark-i-m

This comment has been minimized.

Copy link
Member

commented Sep 15, 2019

I would actually prefer for us to just so this, add it is a common question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.