Mutant C++ Styling…

I find myself more and more adapting my C++ style to what makes code edits simpler. I’ve gone from:

void foo(int a, double b);

to

void
foo(
    /** One important argument */
    int a,
    /** Another important argument */
    double b
   ); 

to make DOxygen documentation cleaner to write and read.

Now I find myself considering this:

void
foo(
    /** stuff */
    int a
    /** more stuff */
    , double b
    )

as when I temporarily #if (0) out an argument during development or create a targeted overload, the comma really does generally bind to the second argument. Not sure I’ll ever warm up to this, but I’ve become used to other changes that looked really ugly when I first made them.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.