www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18648] New: Document the type of std.stdio.stdin and friends


          Issue ID: 18648
           Summary: Document the type of std.stdio.stdin and friends
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dhasenan gmail.com

For those familiar with D, you can look at the unittest documentation for
std.stdio.stdin and reasonably guess that it's a std.stdio.File. That's not
explicitly stated. The template used to initialize it is not documented. So a
new user might reasonably look at the docs and be confused about what they can
actually do with the variable. They might have to ask on D.learn and wait an
hour for a response before they can make progress, because they aren't
confident or perspicacious or knowledgeable enough to look at the Phobos source
code or add in a `pragma(msg, typeof(stdin).stringof)`.

Is this another case of "we might want to change the type later so we can't
document it"?

Mar 22 2018