> What good is a value-semantic Employee class if you can’t assign or swap values of that type?
Question from a Java guy: Is immutability not a thing in C(++) land?
Seems to me most modern high-level languages strive to make structs with "value" semantics immutable, i.e. members are set once on creation and then never changed. You're supposed to interact with those structs through pointers, so most usecases for copying or overwriting a struct don't apply.
I get that this doesn't translate fully well to C's programming model where you seem to interact a lot more with the actual data structures (and not just pointers). But wouldn't the ability to restrict arbitrary changes to a struct still be important?