What if languages had a .=
operator? What would it do?
To me, this operator looks analogous to other assignment operators like +=
, -=
, *=
, /=
, etc. So instead of
person = person.withAge(42);
you could write
person .= withAge(42);
But how often does this situation really happen? About as often as you need to use +=
, -=
or any of the other existing operation/assignment operators, in my opinion.