-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
4.1 Understanding Ownership, Memory and Allocation: unfortunately #3823
Comments
Thanks for reporting. That section was indeed awkward to read. This is what GPT-4 suggests: In Rust, string literals are known at compile time, enabling their direct incorporation into the final executable. This integration contributes to the speed and efficiency of string literals. However, these benefits are intrinsically linked to the immutability of string literals. It's impractical to embed a memory segment into the binary for each text string whose size is not predetermined at compile time and may vary during program execution. |
I don't trust GPT-4 to be good enough for the job, as beginners should not face wild hallucinations in an introductory text, even if they sound correct at first glance. The GPT-4 text has several complicated words that don't contribute to the understanding. The GPT-4 paragraph looks like it were a rephrased variant of the current section from the book. Here's how I would rewrite the section from the book:
|
For me, as a non native speaker, GPT-4 is a great help, its wording is typically much better than mine. Of course it is not always 100% correct, so we have to do carefully proof-reading. You are correct, the cited GPT-text is a rewording of the book, but I like it: https://chat.openai.com/share/7d67c747-7d1d-4e93-b012-1d59188eacd3 [EDIT] Sorry, first pasted link was wrong. |
You're right, I made a typo and actually meant "string literals". |
Thanks! I agree that this is a bit confusing, and at first blush your suggestion is a nice improvement. We'll chat and see if we want to run with that or iterate on it further! |
main
branch to see if this has already been fixed, in this file:Description of the problem:
The text says:
Unfortunately
describes a situation that is not desirable to change.Suggested fix:
Unfortunately, we can
withWe can
.The text was updated successfully, but these errors were encountered: