Originally Posted by
anon
Wow, all this discussion about something so small!
Basically there's a lot of discussion over syntactic sugar, which comes at a greater price for the class writer (class having property implemented in these ways as member would require non-trivial copy constructor/operator= or be uncopyable) and some surprises for the user (because of the conversion operator the property may not always behave as expected).
I don't find any problem with the original approach. In case of a GUI frame, setting and retrieving the caption should not be thought of as accessors to a particular data member, they encapsulate the actions this class was meant for (displaying and controlling a window). (For example, if it is a wrapper around WinAPI then it wouldn't even need a data member for the caption, since Windows stores it someplace anyway and lets me access it.)