
24 May
2004
24 May
'04
2:46 p.m.
Reece Dunn wrote:
It all depends on what you are using the properties for. I use them regularly when dealing with MS COM objects where the interfaces use get/set methods to interface with the underlying object. So you can use them more intuitively (especially when coupled with smart pointers, exceptions and variant/BSTR helpers):
com::msxml::XMLDOMNode node = ...; std::cout << node.nodeName << " = " << node.nodeValue << '\n';
which would look very ugly without properties!
This is a circular logic. The reason that these COM interfaces use get_ and put_ prefixed member functions in their C++ form is because the original interface is property-based, and the reason for that is MS Visual Basic.