ddoc: Params for all elements?

Walter Bright newshound at digitalmars.com
Mon May 22 13:47:48 PDT 2006


Carlos Santander wrote:
> I'm not sure if this should be flagged as a bug, but I find it odd that 
> Params,
> Returns, and maybe others are accepted for modules, aliases, classes, and
> probably other elements. I mean, what does a module return? What are the
> parameters of an alias? I think ddoc shouldn't allow those sections, but 
> I'm not
> sure what the exact behavior should be.
> 
> And as a related note, whatever is done with the previous issue, should 
> also be done when trying to document parameters that don't exist:
> 
> /// Params:
> /// a = nothing
> void foo() {}

Sometimes there are parameters to functions that aren't in the 
function's parameter list, such as a global variable.

One of the design goals for Ddoc is that it doesn't produce error 
messages - it attempts to produce reasonable output regardless.



More information about the Digitalmars-d-bugs mailing list