On Wed, Sep 18, 2013 at 07:17:35PM +0200, Michael Matz wrote: > > > I'd also like us to not use member privatization in our classes, but > > > that's not in the patch, but if we could agree on that it would be nice. > > Member privatization is quite natural. What specifically do you not like > > about the practice? > > http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00302.html > > That was conditional on "when we need to jump through hoops", but for > constistency it'd make sense to avoid it everywhere.
If you need to jump through a bunch of hoops then the language feature isn't useful in that case, but not using it in other cases where it actually is useful only to be consistant seems pretty foolish. Especially if you ban things like fake deletion of members by making them private, or make things public and add an x_ prefix that does the same thing as private but in an uglier way with more manual work. > > > Regstrapped on x86-64-linux, okay? > > > > Obviously any ChangeLog, formatting and such can go in. However, the > > trailing underscore should stay given it's already established practice > > and has several nice benefits. > > What's the benefit of reading and writing such noisy lines? : > > *out_mode = mode_; > mode_ = GET_MODE_WIDER_MODE (mode_); > count_++; > > The uglification merely makes code harder to write and read, it should be > used in cases where you _don't_ want developers to write such names. I don't care for the _ thing too much, but I think it is useful for seeing where a variable comes from, and I don't think you can seriously argue it makes reading or writing much harder. Trev > > > Ciao, > Michael.