cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
504 stars 82 forks source link

Link to the original Chapter 4 #108

Open bacchist opened 11 months ago

bacchist commented 11 months ago

Please consider referring less experienced or knowledgeable readers to the original version of Chapter 4. The rewritten text is substantially more challenging and will not be appropriate for many readers. It is not particularly well suited as a drop-in replacement for the majority of students. The original Chapter 4 should be considered a prerequisite to the rewritten chapter.

willcrichton commented 11 months ago

Hi, the goal is for the updated Chapter 4 to be equally accessible as the original material, while providing a greater depth of understanding about issues like undefined behavior. If there are specific aspects you think are too difficult to understand, please let me know, and I can consider how to improve the text.

mhnap commented 8 months ago

I agree with @bacchist that the updated Chapter 4 does not seem like a drop-in replacement of the original Chapter. I'm learning Rust with previous C++ experience, and I found the original Chapter 4 much simpler to understand. I'm not sure that it's good to teach safety/unsafety or undefined behavior concepts at such an early point in the book. I think it's better to leave them for later chapters. Also, I thought at first that the difference between this book and the original is only in terms of quizzes, highlighting, and visualizations. It was surprising for me to notice that the content is also different for some chapters. Later, I found out about these changes in the changelog, but I think it should be even more obvious for the readers that some content can be different. Maybe showing some red text in the changed chapter itself. I highly appreciate quizzes on this book version, and maybe they can even be merged someday into an original book (or not?), but different content seems to be a surprise, and it would be great to show that this difference exists even more explicitly.