Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: