News for hackers. Stuff that matters.
Re:Java memes which refuse to die by nikolavp on Monday August 27, 2012 @03:01PM (#4440245)
Well if you are changing the behaviour of the getter or the setter then you are already changing the public API contract.

I would rather want a compile time error instead of a silently not changing value in a setter for example after a library upgrade

Re:Java memes which refuse to die by delinka on Tuesday August 28, 2012 @07:39AM (#4443131)
Changing the underlying implementation is not changing the API contract. The API makes no guarantees about where your arguments are shipped off to nor where the return value came from. It simply says "you give me X, Y, Z and I'll return you M" and that's it. This is the very reason for specified APIs: the underlying implementation changes (for caching, efficiency, new storage models, etc) and external code goes on its merry way doing what it did before-- running.