It's beczuse string values are immutable so at any point in a program, the result of string variable comparison would be the same.
For slice types it's more complex because there is mutability implicit aliasing.
And the backing array pointed at may change.
I guess the latter should point us toward deep value comparison for slice types since any other comparison would be quite flimsy.
For slice types it's more complex because there is mutability implicit aliasing. And the backing array pointed at may change. I guess the latter should point us toward deep value comparison for slice types since any other comparison would be quite flimsy.