digitalmars.D - Ranges in std.range vs foreach ranges
- Jonathan M Davis (18/18) Dec 17 2009 The set of properties defined for foreach ranges in the online docs (
- Lars T. Kyllingstad (4/29) Dec 17 2009 With D2, the implementation is the real specification. :) The online
- retard (5/35) Dec 17 2009 To be more precise, I think the official distribution of the dmd binary
The set of properties defined for foreach ranges in the online docs ( http://www.digitalmars.com/d/2.0/statement.html ) does not match those of the ranges in std.range. According to the online docs, foreach requires ranges to have empty next retreat head toe while the corresponding properties in std.range would be empty popFront popBack front back Is this because one or the other is not up-to-date? I would assume that we'd want the two to match up. - Jonathan M Davis
Dec 17 2009
Jonathan M Davis wrote:The set of properties defined for foreach ranges in the online docs ( http://www.digitalmars.com/d/2.0/statement.html ) does not match those of the ranges in std.range. According to the online docs, foreach requires ranges to have empty next retreat head toe while the corresponding properties in std.range would be empty popFront popBack front back Is this because one or the other is not up-to-date? I would assume that we'd want the two to match up. - Jonathan M DavisWith D2, the implementation is the real specification. :) The online docs aren't always up-to-date. -Lars
Dec 17 2009
Thu, 17 Dec 2009 11:13:29 +0100, Lars T. Kyllingstad wrote:Jonathan M Davis wrote:To be more precise, I think the official distribution of the dmd binary is the specification, the sources might not behave in the same way and may lack the release tags in the vcs :o) To be sure, I recommend using objdump.The set of properties defined for foreach ranges in the online docs ( http://www.digitalmars.com/d/2.0/statement.html ) does not match those of the ranges in std.range. According to the online docs, foreach requires ranges to have empty next retreat head toe while the corresponding properties in std.range would be empty popFront popBack front back Is this because one or the other is not up-to-date? I would assume that we'd want the two to match up. - Jonathan M DavisWith D2, the implementation is the real specification. :) The online docs aren't always up-to-date.
Dec 17 2009