[Ns-developers] coding style and code reviews update

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Dec 8 03:29:03 PST 2009


On Tue, 2009-12-08 at 12:14 +0100, Timo Bingmann wrote:
> On Tuesday 08 December 2009 07:43:40 Tom Henderson wrote:
> > We've had some on-list and off-list discussion about how the ns-3 code
> > reviews are going, and about the use and possible changes to the coding
> > style guidelines.
> 
> While we're at it: I don't know if this issue has been discussed previously, 
> but I always trip over the (void) argument lists in any function taking no 
> parameters. As in
> 
> void
> Foo (void)
> {
> }
> 
> This is a relic from plain C times, when functions would take any arguments 
> without the void.
> 
> However, with ns-3 using such very advanced C++ constructs this nostalgia 
> strikes me as very odd. Does anyone know another modern C++ community 
> requiring this?

No, but I did not look very hard. I personally don't care much which of
the two versions is used and would be fine with making a pass over ns-3
to update it to one or the other, but not _both_. 

The vast majority of the ns-3 codebase uses (void) which means that,
unless we update the coding style, new code should use (void) and not ()
to help us improve the consistency of the codebase.

Mathieu



More information about the Ns-developers mailing list