rust-lang / book

The Rust Programming Language

Home Page:https://doc.rust-lang.org/book/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong use of the term "shadowed"

StefanSalewski opened this issue · comments

Hello,

in the last few weeks I read the freely available version of your great book about the Rust programming language. As a non native English speaker, I had the feeling that the book still has some issues. As the book is already printed, I am not sure if you may be still interested in fixing issues. So I will report only the most serious one for now:

It is the term "shadowed" that is used a few times (at least three times) wrong for actually SHADOWING variables. That is really irritating, the wording is used so often and contradict the use in other textbooks or at Wikipedia. As I had still some doubts as a non native speaker, I asked at the Rust forum for confirmation: https://users.rust-lang.org/t/variable-shadowing-strange-wording-in-official-rust-book/101567

If you should be interested in more reports of tiny issues, let me know, I can provide some more.

Best regards,

Dr. Stefan Salewski

I didn’t get the problem from your description (though it is accurate), but reading the link this seems trivial. In short, it’s about replacing ”shadowed” with ”shadowing”, in a few places. The relationship is kind of swapped.

Have you sent the PR about this - as suggested?

it’s about replacing ”shadowed” with ”shadowing”,

Yes, that is the core of the issue and the easiest solution. (As a non native English speaker, I was not really sure about this, but it was suggested in the forum thread as well, so I guess it would be fine.)

I have never created a PR myself before. I guess it might be some effort, including forking the book source? And I hesitate to do it -- as a non native speaker, I can see issues in the text, but often have not the perfect solution.

Having read nearly all of the online book version now, I find it a bit sad and strange that the book has still so many tiny issues. That makes reading it less fun. I read it with the Textmarker Firefox plugin and marked a lot of stuff, including the grammar issues and a few bad wordings, and I already reported a few of them as issues. But til now there was no reply from the authors, maybe they have already retired.

But well, the book is quite good, at least good enough as an introduction to Rust, and freely accessible. The last point is really important -- in the past I bought many books, and then discovered that I don't really need or like them, and now they occupy a lot of space in my house, and are a large burden when moving. I should dump them all, but I always hesitate. Amazons kindle format is not a real option for me, as I can not read it on Linux. When I should decide to continue using Rust, I might buy https://nostarch.com/rust-rustaceans. They offer a PDF, when buying directly, and not at Amazon. And when all the issues in the official Rust book are finally fixed, I might buy that as well. Having a PDF version is always good, and I think buying the book supports Rust development.

Best regards,

Dr. Stefan Salewski

It is not normal to divert Issues discussions to things other than the subject matter, out of politeness to reader.

I can bring this up in a few weeks (i.e. create a PR) once I’ve finished the book, but can also help you by reviewing the PR. Don’t be afraid - they are a means of collaboration and can be fine tuned between creation and merge). It’s not your responsibility to be perfect so give it a go? :)

After your kind suggestion about creating PRs (pull requests), I studied yesterday evening the list of currently open PRs, and commented on one of the larger one, see my detailed comments in #3790

As you see, such pull requests typically contain mistakes. As I am a non native speaker, without good English skills, my ones would even contain more mistakes unfortunately. Actually, I am surprised how many issues the book text still contains -- I missed most of them when reading the book online version some time ago. From my initial understanding, the book has been online for more than a year, read by many native speakers, and was even printed by a company called NoStarchPress. So I assumed only a few issues left, more related to content than to grammar. That was my motivation to open a few tiny GitHub issues. But when there is so much more work to do left, then I think I should just be quit and wait for the next edition, which I may buy then. (I am not absolutely sure if I will buy a copy, I read that NoStarch takes 20$ for shipping to Europe, which is quiet a lot, and Amazon offers no PDF unfortunately.) I am well aware how difficult it was for non native speakers in old times before AI tools like ChatGPT to write correct and good English -- I had a lot trouble with it myself for my book about the Nim language, I spent 300 hours fixing grammar with tools like Grammarly, PyLangTools, Quillbot, and finally with GPT-4. But for a mainstream book, printed by a publishing house, I expected really only a few tiny errors left.

Best regards,

Dr. Stefan Salewski

I noticed that PR myself. To my liking, it’s way too long.

It’s often better (for reviewing) to have PRs short and focused. But this is not the place to discuss that. Let me know if you need help. Otherwise, I promise to take the shadowed vs. shadowing to PR, within some weeks.