[bind10-dev] style and coding guidelines
Jelte Jansen
jelte at isc.org
Thu Oct 8 13:08:03 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
in my proposal for an agenda I included an item on coding guidelines, mainly i
have a few questions which came up during recent discussions. The discussion
doesn't have to take long (in fact it shouldn't, except in perhaps one case),
but it would be nice to at least see if we have consensus.
A bit more background, in case you haven't followed this specific part of the
discussion (it was buried a bit deep in much longer mails)
- - comment style:
Do we want to allow c-style comments, or go purely with c++-style comments?
The latter looks a lot cleaner
There is one possible thing, however; I haven't checked up on how
documentation-generators accept them. I've always used the /** */ format for
doxygen, but I can imagine it could also parse other comment styles. I just
don't know. I do assume here that we want automatic documentation generation
somewhere along the project, especially for the API.
- - namespaces
This has seen a separate discussion already, but I don't think anything's been
decided yet. My vote would actually be for BIND:: or BIND10::, but i can live
with ISC::
- - exceptions
I think we agree generally to only use them for unexpected cases, but there
seems to be a difference of opinion on what is expected.
My opinion (emphasis on opinion!) is that for instance, when you call a parser
that returns the object described by whatever it is you parse, anything that
prevents the parser from creating said object should be an exception. This
includes syntax/user errors. An example of something that should not be an
exception is for instance fetching a remote object that could exist, but doesn't.
As I understand consensus was (interpreted) to be different. Which could very
well be, I just want to hammer it out so that it's clear. At least to me :)
- - languages
This is not so much a style issue, but i think we should standardize on at most
two languages for the software itself (*not* for external bindings to our
software). For experiments this doesn't matter but for anything that's going to
be compiled/run outside it does.
Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrN5DMACgkQ4nZCKsdOncXufACfQxrSK2Xrb7jt73AnJvx8u+2S
chQAoIHoY5cmAmipPlhGiiTvXkI6nSth
=/een
-----END PGP SIGNATURE-----
More information about the bind10-dev
mailing list