Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.world

3 replies

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.

1

You reached the end

Why We Need Getters and Setters | Spyke