www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Documentation

I think that D needs to better at documentation. First there are many 
undocumented public declarations. Just now I looked at the documentation 
of std.typecons.Tuple to see if it was possible to unpack/get access to 
all fields. There's nothing mentioned about this in the documentation 
but when a look at the source code a see a couple of undocumented 
declarations, like:

     Types field;
     alias field expand;
     alias field this;

     enum length = field.length; // this is documented but doesn't end 
up in the documentation

Now the only declaration that would end up in the documetation of these 
declarations are "Types field" and "alias field expand" (I think). This 
leads to some the second point. I think DDoc needs a couple of 
enhancements (please correct me if I'm wrong):

* Docs for manifest constants, i.e. "enum length = field.length;"
* Docs for string mixins, i.e. "mixin(foo());" - issue 2420
* Docs for template mixins, i.e. "mixin Foo;"
* Docs for alias this, i.e. "alias field this;"

Some general ddoc enhancements: 

/Jacob Carlborg
Jul 22 2011