digitalmars.D - std.mmfile: void[] opSlice(), ubyte opIndex() inconsistent type?
- mw (13/13) Oct 08 2022 Hi,
- Steven Schveighoffer (3/22) Oct 08 2022 Yes. But I feel like this was brought up before and rejected...
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()?
Oct 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
Oct 08 2022