Why We Need Getters and Setters

https://www.youtube.com/watch?v=JzMTe_5IrFc

An in-depth dive into the implications of getters and setters, and how not using them might end up costing billions of dollars in the case of major companies.

4 points · 3 comments · view on lemmy.world

3 Comments

dance_ninja@lemmy.world · 1 pts · 1y

Valid point and well communicated. Thanks for sharing!

SpaceNoodle@lemmy.world · 1 pts · 1y

This could have been an article.

MysteriousSophon21@lemmy.world · 1 pts · 1y

Getters/setters are just a band-aid for poor object design - true encapsulation means objects should expose behavior not state, otherwise your just making glorified structs with extra steps.