-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rodata in std::str
may be an unfamiliar term
#18449
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
Comments
rodata is standard OS jargon for the Read-Only Data segment of a program. Or are you suggesting that they are in fact allocated elsewhere? |
No, I just didn't know what it meant. I'm familiar with read only but I definitely didn't recognize it as an acronym. |
std::str
std::str
may be an unfamiliar term
@mdinger I tried to make it more explicit that rodtaa is a section of the executable, do you think that it is clear enough ? |
Hmm...Overall I'm ambivalent I guess. Adding a period does suggest it's less likely to be misspelled (because methods sometimes are cryptic) but doesn't point toward what it might mean unless you already know. I would probably just link to wikipedia or expand it in place to |
The fact that it's in the |
@thestinger Honestly I think the notion of section really help to understand for C people (at least the people used to do bare-metal). |
Low-level programmers don't need help to understand how an immutable |
Well the other solution is to remove the statement totally if you want. |
I think it should be replaced with documentation explaining that string literals are immutable views with a static lifetime ( |
@thestinger better ? |
Made the fact that rodata is a section of the executable more explicit Closes #18449
In
std::str
, there is a typo. I don't know whatrodata
is supposed to be:The text was updated successfully, but these errors were encountered: