3 points · by clitromney · 14y ago · 2 comments
Modern OO thinking requires that only functions that preserve the integrity of the invariant should be member functions. If you're talking about an arbitrary 3 dimension point in space, that invariant is hugely generous and you'll have no member functions at all. They're three numbers, do with them what you will. The insert method, on the other hand, of a red black tree is so absolutely connected with its data structure that it would be an error to try to factor it out.
The problem, as always, are golden-hammerists. Everything has its use, in moderation and with a light hand, a conclusion I think this article still arrives at ever so subtly.