Value, reference, and move types and semantics
I see a lot of confusion about value types and references types. Although I’m not sure how common this perspective is, here’s how I think of it. First of all, value types have value semantics and reference types have reference semantics. The semantics of a type is the behavior of variables of that type. Let’s say there are two variables, a and b, that have already been created and have the same type....