Bug 18648 – Document the type of std.stdio.stdin and friends
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-22T19:56:48Z
Last change time
2018-03-26T14:07:25Z
Assigned to
No Owner
Creator
Neia Neutuladh
Comments
Comment #0 by dhasenan — 2018-03-22T19:56:48Z
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"?