[bind10-dev] Operators

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Thu Feb 23 07:11:16 UTC 2012


At Wed, 22 Feb 2012 12:20:08 +0100,
Shane Kerr <shane at isc.org> wrote:

> > On a further related note: we have this in our coding guideline:
> > http://bind10.isc.org/wiki/CodingGuidelines#OperatorOverloading
> > "When a class supports operator overloading, then there should also be
> > non-overloaded methods".  I don't know the rationale of this guide,
> > and, as a matter of fact, we don't follow this rule so consistently.
> > If it really makes sense, we should make sure we do it more
> > consistently; if the rationale isn't clear and we actually don't
> > follow it anyway, I think we should rather remove it from the guide.
> 
> I'm not sure about this though. I do remember us agreeing to this, but
> I don't remember the motivation. :( Perhaps we need an annotated
> version of these guidelines which explains the "why" as well as the
> "what"?

Adding 'why' is a good practice.  That's one thing I like in the
goole's style guide:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
(it doesn't really explicitly say "why", but it gives some detailed
discussions on pros and cons of each issue).

> So I wouldn't be opposed to deprecating this guideline, if everyone
> else thinks that is a good idea.

I'm not necessarily objecting to this guideline topic, but I don't
think it makes sense to have it if we cannot follow it anyway.  Maybe
a good bikeshed topic of the (next) week.

---
JINMEI, Tatuya


More information about the bind10-dev mailing list