NARRATOR: No one cares that you know the word "rvalue", jonathan. In Rust we call them places, which is totally different and so much cooler?
In Rust, a place intuitively corresponds to a C lvalue: *b = a compiles in Rust because *b is a place (and in C because *b is a lvalue). While it's true that places can coerce to values (which is why a = *b compiles for pointers to Copy types and for Box), it seems to me that saying places are rvalues is incorrect, especially considering how 12 would be a rvalue, but definitely not a place.
Perhaps the narrator say that nobody cares jonathan knows the word "lvalue"?
Whoops yeah. the second half didn't use to be there so it didn't matter if I said rvalue or lvalue, but once I added the part about "places" it should really be precisely an lvalue. Fixed, thx.
https://rust-unofficial.github.io/too-many-lists/fifth-testing-stacked-borrows.html contains this quote:
In Rust, a place intuitively corresponds to a C lvalue:
*b = a
compiles in Rust because*b
is a place (and in C because*b
is a lvalue). While it's true that places can coerce to values (which is whya = *b
compiles for pointers toCopy
types and forBox
), it seems to me that saying places are rvalues is incorrect, especially considering how12
would be a rvalue, but definitely not a place.Perhaps the narrator say that nobody cares jonathan knows the word "lvalue"?