import concerns (C++ visib question)
Bruno Medeiros
brunodomedeirosATgmail at SPAM.com
Sat Jul 8 16:35:36 PDT 2006
Sean Kelly wrote:
> Walter Bright wrote:
>> Derek Parnell wrote:
>>> I'm sorry Walter but I don't give newt's fart about C++. If I wanted
>>> to code under the rules of C++, I'd use C++. You have changed
>>> (improved) many of the C++ rules in D, so why not get this one right
>>> too?
>>
>> I agree that D exists to fix broken rules in C++, but we need to
>> understand the rationale for why they are the way they are in C++,
>> else we run the risk of making a severe error. I don't recall why the
>> access rules are the way they are in C++, but I do know they weren't
>> don't that way for backwards compatibility.
>
> Please see my post here:
>
> http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/39072
>
> According to Daveed Vandevoorde:
>
> The fact that private members are inaccessible but not invisible
> regularly surprises incidental programmers. Like macros, seemingly
> unrelated declarations interfere with subsequent code. Unfortunately,
> there are good reasons for this state of affair: Without it, private
> out-of-class member declarations become impractical to parse in the
> general case.
>
Well, that clearly states that private members should not be invisible
in C++, but I'm having trouble understanding why. He says "Without it,
private out-of-class member declarations become impractical to parse in
the general case." but I don't see how or why, anyone has an example or
clarification?
--
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list