Should DDoc list all publics by default?

Lutger lutger.blijdestijn at gmail.com
Fri Jul 6 08:40:35 PDT 2007


torhu wrote:
> I find that I sometimes do things like this in order to get dmd to 
> include a definition in the doc output:
> 
> ///
> struct Point
> {
>     int x;  ///
>     int y;  ///
> }
> 
> 
> This doesn't look that great.

Personally I don't mind these empty slashes. But documenting this with 
comments is silly indeed.

> The suggestion is: Make dmd -D include all public declarations by 
> default, even those with no doc comments.  Any opinions, counter 
> examples, whatever?

I think it is a good feature (although it could be done in other tools). 
It will also help to generate 'documentation' for projects that are not 
documented at all.

But I think it should not be done by default, instead a switch for this 
should be given. The main reason is that as you document your api for 
others, you want control over what not to include (even if they are 
public methods). That kind of control should be the default, so that 
when others generate documentation from your source they get it how you 
intended it to be.






More information about the Digitalmars-d mailing list