Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!att!westmark!mole-end!mat From: mat@mole-end.UUCP (Mark A Terribile) Newsgroups: comp.lang.c++ Subject: MI and namespaces Keywords: MI namespaces Message-ID: <192@mole-end.UUCP> Date: 18 May 89 03:54:20 GMT Organization: mole-end--private system. admin: mole-end!newtnews Lines: 35 Does anyone else have a feeling of possible impending doom lying around the corner somewhere near MI? Let's say that one of my various base classes (Ba) has a void Ba::reverse() . I also have a base class Bb, and one day into one of *its* base classes (Bbb, let us say) I add a base class which as a Bbb_b::reverse() . I have now created an ambiguity. It's not clear to me that I can solve anything by making one of the base classes private, and I don't really want to do that anyway. All I want to do is prevent Bb_b::member_xyz from being IMPLICILTY visible and from being able to cause an ambiguity. In other words, I want Bb_b::member_xyz to be visible in my ``most derived'' class as Bb_b::member_xyz but *not* simply as member_xyz . Moreover, I may have another member_xyz which I *do* want to be able to refer to without qualification. Making the base class private and making public only the members you mean to use may or may not solve the problem, depending on whether invisible private members can create an ambiguity with visible ones. (I've heard it both ways, most recently that they can. Will some very knowledgable person please straighten me out?) I fear that inheriting from lots and lots of base classes to get a variety of capabilities is almost sure to lead, sooner or later, to enough ``print''s and ``dump''s and ``debug''s and ``verify''s that we are either going to begin prefixing these names with the class qualifer out of habit or we are going to prepend the class's name to the member name we would like to use. This will indicate (to me at least) that the name space controls we have are inadequate. (This fear was reinforced today by my superior, who described the chaos that occurs when namespaces are merged without controls as ``unstructured global goto's.'' I share this bogey with someone, at least.) -- (This man's opinions are his own.) From mole-end Mark Terribile