Dimitri said:
Getting back to original topic, by-value "=" on objects works only
as long as the programmer is not allowed to override operators. If
you override '=' to do deep copy, the "x=y; y=z;" will start working
as it should.
Being wrong isn't a problem. Being arrogant and wrong is. You should
probably fix that.
the semantics of "x=y;y=z;" resulting in x==y is simply not correct for
assignment. if you implemented deep copy, it still wouldn't work.
again, I would suggest that you give an example in a language that allows
that. the variable y would have to in some way remember that it had been
assigned to x, so that when z got assigned to y, it would also write to x.
Not only are you not a java expert, you seem to not understand basic
programming semantics. I wouldn't go around calling people java weenies
any more.