std.mmfile: void[] opSlice(), ubyte opIndex() inconsistent type?
Steven Schveighoffer
schveiguy at gmail.com
Sat Oct 8 20:59:52 UTC 2022
On 10/8/22 4:50 PM, mw wrote:
> Hi,
>
> I noticed:
>
>
> https://dlang.org/phobos/std_mmfile.html
>
> ```
> void[] opSlice();
> Returns entire file contents as an array.
>
> void[] opSlice(ulong i1, ulong i2);
> Returns slice of file contents as an array.
>
> ubyte opIndex(ulong i);
> Returns byte at index i in file.
> ```
>
> Should the type of opSlice() be ubyte to be consistent as opIndex()?
Yes. But I feel like this was brought up before and rejected...
-Steve
More information about the Digitalmars-d
mailing list