This is the mail archive of the gcc@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: Using C++ in GCC is OK


> > Right, but it may happen some day.  Also there is the issue of
> > clarity.  I think it is clearer to see this->get() rather than get().
> 
> this->put_size (this->get_bounds (this->get_x(), this->get_y()),
>                 this->get_variance (this->default_variance ()))

I think clarity can be a mixed bag sometimes and there's a tradeoff.
While in the "micro" view, one thing might be clearer than the other,
if it's longer in a repetitive way (like the above), it's harmful to
clarity because it keeps the eye from quickly seeing the important
things since it has to "filter" out the redundancy.

All of us make tradeoff like this all the time: it's why we tend to
make variables that are used more be shorter.  And I think the GNU
Coding Conventions are designed with the above principle in mind.

I don't know enough C++ to have any comments on specific issues here,
but I think it important to preserve the principle that we want to
have enough information in the code for the "practiced eye" to quickly
see what's going on, but not enough that it make it HARDER to do that.


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