Boost logo

Boost :

Subject: Re: [boost] Interest in a '' library?
From: Joe Mucchiello (jmucchiello_at_[hidden])
Date: 2013-07-08 00:31:52

Personally, I always consider properties with getters/setters an anti-pattern for OOP languages like C++. Class interfaces should include only those methods that describe logically valid actions one might take on instances of the class. The idea of properties might sometimes be appropriate. But often times, programs will see a hammer and treat everything they see after it as nails. It becomes easy to add a few more getters and setters for "the rest" of the implementation details and you lose proper encapsulation. Usually when I find a class with lots of get/set methods I find a class with very little thought used when that class was designed.

Boost list run by bdawes at, gregod at, cpdaniel at, john at