Bug 10092 – Renaming std.range.chunks as std.range.chunked
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-16T04:55:00Z
Last change time
2013-10-02T04:58:14Z
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-05-16T04:55:14Z
Often the chunks() function has a name clash between std.stdio and std.range:
import std.stdio, std.range;
void main() {
chunks("abcd"d, 2).writeln;
}
DMD 2.063beta2:
temp.d(3): Error: std.stdio.chunks at C:\dmd2\src\phobos\std\stdio.d(2311) conflicts with std.range.chunks(Source)(Source source, size_t chunkSize) at C:\dmd2\src\phobos\std\range.d(6517)
temp.d(3): Error: constructor std.stdio.chunks.this (File f, uint size) is not callable using argument types (immutable(dchar)[], int)
So to solve this little problem I suggest to rename std.range.chunks as std.range.chunked, and introduce an std.range.chunks alias that later will be deprecated and then removed.
Comment #1 by bearophile_hugs — 2013-10-02T04:58:14Z