The following seems like a battle of wills between two different typing paradigms. std::vectorboost::any m_schizophrenicCollection; The thought of this is making me a bit uneasy. comments? ~christopher
chris_baus wrote:
The following seems like a battle of wills between two different typing paradigms.
std::vectorboost::any m_schizophrenicCollection;
Schizophenic conventions are a fact of life in C++ :¬ ( Standard library uses one convention, most vendor frameworks / OS APIs use another. Any 3rd party libraries you use are likely to introduce at least a third, and maybe fourth and fifth. Reconciling all the above means the in-house conventions quickly become yet another. I strive for local consistency within a piece of code. For instance, I would use the same convention for naming all members within a class, and implementing the associated functions. I would not worry too much if some of the type names it uses, or calls to other libraries it makes, use different conventions. Then select convention for the class itself based on its typical usage. So long as the code is clear and consistent in how it moves between conventions, most readers can adapt and don't even notice they are doing it. -- AlisdairM Team Thai Kingdom
--- In Boost-Users@yahoogroups.com, Alisdair Meredith
chris_baus wrote:
The following seems like a battle of wills between two different typing paradigms.
std::vectorboost::any m_schizophrenicCollection;
Let me clarify what I meant by that a bit more. I see this as a conflict of wills between the generic and OO type systems. I see boost::any as a paradigm shifter. We use both OO concepts and some generic concepts in our code base and at times it isn't obvious when the switch between the two paradigms occurs. I believe the above code is shifting between the paradigms in a subtle way. christopher
participants (2)
-
Alisdair Meredith
-
chris_baus