Suggestion for DDoc - share parameter descriptions

Jarrett Billingsley kb3ctd2 at yahoo.com
Thu May 18 20:14:34 PDT 2006


Sometimes, you have several parameters that work together, as components of 
an aggregate value, perhaps.  In this case, it seems redundant to write


/**
Makes a spoony color.

Params:
    r = The red component of the color.
    g = The green component of the color.
    b = the blue component of the color.
*/
uint spoon(int r, int g, int b)
{

}


Instead, it'd be convenient to write something like


/**
Makes a spoony color.

Params:
    r = The red, green, and blue components of the color.
    g = ditto
    b = ditto
*/


Which follows the current convention for using the same documentation for 
multiple items.

Or even better:


/**
Makes a spoony color.

Params:
    r, g, b = The red, green, and blue components of the color.
*/


A niche feature, I know, but it's just for fun. 





More information about the Digitalmars-d mailing list