3 ms·
I've used Java for over 20 years. Not once have I ever replaced an attribute with a computed value. Also p.x = p.y + p.z is much easier read. Another drawback
by eweise 6y ago
I've used Java for over 20 years. Not once have I ever replaced an attribute with a computed value.
Also p.x = p.y + p.z is much easier read.
Another drawback of getters and setters is that you end up not looking at that code because you assume you know what it does, so you can miss when someone puts logic into a setter or getter