What will this code print:
Point a = new Point(10, 10);
Point b = a;
a.x = 100;
System.out.println(b.x);
Until now the answer was obvious. Now with the addition of value classes, the answer depends on whether Point is a value class or a reference class. So readability suffers with this design.This is a violation of the principle of uniformity. In The Psychology of Computer Programming, Weinberg explains that uniformity is a psychological principle which says that users/programmers expect that things that look similar should do similar things, and conversely that things that look different should do different things.
If a programming language lets two constructs look nearly identical at the use site while having meaningfully different semantics, it increases the cognitive burden on the reader. Programmers must inspect the type declaration or rely on tooling to understand whether assignment, equality, identity, and mutation behave like ordinary reference objects or like values. That can make code harder to reason about and maintain.
This could have been fixed by requiring the use of the "value" keyword not just at declaration time but also at use time like this:
value Point a = new Point(10, 10);
Point b = a;
a.x = 100;
System.out.println(b.x);