October 08, 2022

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()?

October 08, 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