News for hackers. Stuff that matters.
Re:A half-hour to learn Rust by millstone on Saturday January 02, 2021 @05:52PM (#25617399)
The operator overloading is nice but you still get smacked in the face right away by the borrow checker. Simple stuff like this won't compile ("use of moved value"):

    let a = Integer::from(10);
    let b = a + a;
Re:A half-hour to learn Rust by pimeys on Sunday January 03, 2021 @06:02AM (#25621060)
This would work if `Integer` would implement the `Copy` trait. But I guess that type is heavy enough for it to be too expensive, therefore forcing you to explicitly call `clone()`.
Re:A half-hour to learn Rust by Measter on Sunday January 03, 2021 @07:21AM (#25621366)
That `Integer` type can't implement `Copy` because it manages a resource, meaning you can't just do a simple memcpy of the type.
Re:A half-hour to learn Rust by smmalis37 on Monday January 04, 2021 @01:04AM (#25628304)

  let b = &a + &a;
will work, but I agree it's unfortunate that this is necessary.