3 ms·
I've always been told that the get, set() idiom is to allow the author to change the implementation at a later date. I always resent doing it but I can see how
by eliasmacpherson 14y ago
I've always been told that the get, set() idiom is to allow the author to change the implementation at a later date.
I always resent doing it but I can see how if the body of the function is not declared in the header file, but instead the associated .cpp file, that an author can change it, without introducing a whole recompile overhead.
Writing code that may not be needed is bad, but it's a trade off vs. preventing other users writing code that depends on it when their code should not.
- deleted 14y ago[deleted]