This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] manage dom-walk_data initialization and finalization with constructors and destructors


On Sep 19, 2013, at 6:23 AM, Michael Matz <matz@suse.de> wrote:
> Me neither, from that perspective it's okay.  It's merely that I doubt the 
> value of any syntactic privatization like it's implemented in C++, you can 
> #define it away, hence the compiler can't make use of that information for 
> code generation, and the cognitive value for the developer ("hey I 
> shouldn't look at this member from outside") is dubious, as that probably 
> is a general rule, no direct data member access from non-members (although 
> I have problems with that too).

If we are making engineering decisions on the basis of people being able to say #define private public, well, we are so far off into the weeds as to not be funny.

ODR:

  --each definition of D shall consist of the same sequence  of  tokens;

Just because you see no value in private, doesn't mean others don't.  Consider this, It would not be in the language if everyone shared your view.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]