It depends on the programming language. If you use a language where variable types are not enforced, then this could happen.
x = 1;
y = 494.0;
z = new Object();
x = y = z = "hello";
Now x,y,z are all a string. This might be confusing if found later on in the code.
The other problem is operator overloads. Some languages allow you to change what happens for the left-hand assignment of a property. So the following could happen.
x = y.something = 0;
Where y.something
doesn't return 0
. It returns null
.
Otherwise, I don't have a problem with it. If it's a strongly typed language and there is no risk in the above happening. Then no problem.
The other problem is in how you read the source code.
a = b = c = new Object();
Is not the same as.
a = new Object();
b = new Object();
c = new Object();
It's really like this.
c = new Object();
b = c;
a = b;
It might not be clear that all three variables have the same reference.