digitalmars.D.bugs - [Issue 18153] New: undocumented public structs ByLine, ByRecord,
- d-bugmail puremagic.com (26/26) Jan 02 2018 https://issues.dlang.org/show_bug.cgi?id=18153
https://issues.dlang.org/show_bug.cgi?id=18153 Issue ID: 18153 Summary: undocumented public structs ByLine, ByRecord, ByChunk Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: minor Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: dkorpel live.nl I accidentily wrote this code: import std.stdio; foreach(line; File(fileName, "r").ByLine) { ... } And got this confusing error: Error: cannot resolve type for ((File __slFile908 = File(null, null);) , __slFile908).this(fileName, "r").ByLine(Char, Terminator) It turns out I wasn't calling the method 'byLine' but the constructor of the struct 'ByLine'. Is there any reason the struct ByLine, as well as ByChunk and ByRecord, are public? I can't find any documentation on them. I suggest either making them private (like ByLineCopy), or documenting their use. --
Jan 02 2018