Re: [boost] Re: [review] Formal review of

In-Reply-To: <loom.20041011T172801-139@post.gmane.org> nesotto@cs.auc.dk (Thorsten Ottosen) wrote (abridged):
If there is no null in the tree, then why test for it?
The test is to prevent moving a null dog to the tree.
I suspect having null is reasonable, but I explicitly requested to see the code.
There is no real code; the example was invented to illustrate the importance of post-conditions. Which is another way of putting what it says in the .pdf file you referenced: the Null Object pattern is not universally applicable. The point is general and not about the specific code. Are you claiming that Null Object is, in fact, applicable in every situation? If not, just imagine I picked an example where you agree its not applicable. If, on the other hand, you believe no such example is possible, then you surprise me. Regardless I don't think further discussion is appropriate here, because it is not crucial to the Smart Container proposal. As I said in my original message: ... this is no more an argument against ptr_vector<Dog> than it is against std::vector<Dog>. In saying that I was supporting your proposed library. Given that ptr_vector<T> behaves more like vector<T> than vector<T*>, the restriction on NULLs is logical and reasonable. -- Dave Harris, Nottingham, UK
participants (1)
-
brangdon@cix.compulink.co.uk