@hairinmybellybutt@lemmy.world to Programmer Humor@lemmy.ml • 1 year agoobject.setobject(object.getobject().object).to_object()lemmy.worldimagemessage-square12fedilinkarrow-up155arrow-down15
arrow-up150arrow-down1imageobject.setobject(object.getobject().object).to_object()lemmy.world@hairinmybellybutt@lemmy.world to Programmer Humor@lemmy.ml • 1 year agomessage-square12fedilink
minus-square@DarthFrodo@lemmy.worldlinkfedilink19•1 year agoThe neat thing is, you can add stuff like range checks and logging for getters and setters without changing every call. Separation of concerns is also vital in larger projects.
minus-square@jazz@lemm.eelinkfedilink6•1 year agoalso const correctness in languages that support that concept
minus-square@HakFoolink2•1 year agoYou can, but who ever does? I suppost that’s why some languages offer autogenerated minimal getter/setters, but that still seems like the same thing with extra steps.
The neat thing is, you can add stuff like range checks and logging for getters and setters without changing every call. Separation of concerns is also vital in larger projects.
typical OOP progaganda
also const correctness in languages that support that concept
You can, but who ever does?
I suppost that’s why some languages offer autogenerated minimal getter/setters, but that still seems like the same thing with extra steps.