Documentation
Jacob Carlborg
doob at me.com
Fri Jul 22 00:23:52 PDT 2011
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;
mixin(injectNamedFields());
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:
http://d.puremagic.com/issues/show_bug.cgi?id=3161
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list