News for hackers. Stuff that matters.
Re:“What if it changes?” by kadoban on Sunday May 22, 2022 @08:36PM (#31474228)
The number of getters and setters I've written that never got changed into anything more than read/change variable has to be _hundreds_ of times more than the ones that ever did anything else.

At what point is it cheaper to just refactor into getters/setters later when needed? That point _has_ to be miles behind me.

Re:“What if it changes?” by ratww on Sunday May 22, 2022 @10:09PM (#31474709)
True.

Another problem (from a class/library-consumer point of view) is having getters/setters suddenly becoming more expensive to call, blocking, or even having side effects after an update.

It often only affect the runtime behavior of the code.

Changing the interface, however, will give me a hit that something else has changed.