Phobos examples and auto

Steve Teale steve.teale at britseyeview.com
Sat Nov 5 10:42:59 PDT 2011


There's a growing tendency in Phobos documentation to use auto.

auto now = Clock.currTime();

Now I can understand that when the RHS is some obscure template, whose 
type might not be immediately obvious, the user should possibly be 
encouraged to RTFM. But if the outcome is deterministic I just have the 
feeling that documentation should provide information rather than hiding 
it.

OK, in Jonathan's example, this is preceded by a sentence that says that 
the result is a SysTime. But the auto made me forget, and wonder what it 
was, rather than reinforcing the preceding sentence.

I realize that this is probably a trivial point, but at the same time, in 
documentation, clarity is wonderful.

Steve


More information about the Digitalmars-d mailing list