book icon indicating copy to clipboard operation
book copied to clipboard

Rephrase for clarity

Open octavioooooo opened this issue 1 year ago • 5 comments
trafficstars

Didn't see any explicit standards in CONTRIBUTING.md, so I apologize, but this is my first PR here. Wanted to start small.

octavioooooo avatar Jan 08 '24 19:01 octavioooooo

Can you describe what you find unclear about the original and how the change clarifies it for you?

carols10cents avatar Jan 08 '24 20:01 carols10cents

Sure @carols10cents ! Thank you for having a look.

  1. "i32 is Copy": isn't this a confusing thing to say? I thought i32 was a type, but now it's also a trait? Isn't "i32 implements the Copy trait" more accurate?
  2. "x would move into the function": this one is a personal preference. The previous version has a hypothetical scenario ("would") followed by a contradiction ("but"). I think my small brain would appreciate if the causality ("i32 implements Copy -> x does not move into function") was simpler to follow and written out.

octavioooooo avatar Jan 08 '24 20:01 octavioooooo

"i32 is Copy": isn't this a confusing thing to say?

"is copy" is a Rust term. I read a short explanation when I started learning Rust a few months ago -- I am not sure if in the book or elsewhere. Can not find it in the book currently -- of course explanation should come before use in the book. You can read explanation here: https://dhghomon.github.io/easy_rust/Chapter_19.html

StefanSalewski avatar Jan 14 '24 11:01 StefanSalewski

"is copy" is a Rust term.

I didn't know about this "Easy Rust" book. TIL simple types with known sizes are always copied and therefore are called "Copy Types". Writing "i32 is Copy" seems to be a "Rust thing" and isn't confusing at all then haha.

Thank you. Should I close this PR or is it still valid?

octavioooooo avatar Jan 15 '24 02:01 octavioooooo

This is still valid-- please leave it open. I do need to think about how exactly I want to update this though, and it might be a while before I get to it.

I actually tried to remove all instances of "is [Trait]" a while ago but looks like you found one I missed! Thank you for the great catch!

carols10cents avatar Jan 17 '24 01:01 carols10cents