Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!rutgers!att!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: Data Hiding, private members, and globals Message-ID: <9560@alice.UUCP> Date: 5 Jul 89 03:03:53 GMT References: <391@odi.ODI.COM> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 16 In article <391@odi.ODI.COM>, benson@odi.com (Benson I. Margulies) writes: > In other words, if I happen to pick a global name that matches an > inaccessible private member of my class, I get yelled at. Yes, but at least it's only inside member functions. The compensating advantage is that if a C++ program compiles, its semantics will remain the same even if you change all private data and derivations to public. Moreover, if you want to insist on referring to global data, you can always put a :: in front of the name to make your intentions clear. -- --Andrew Koenig ark@europa.att.com