On Monday, 6 January 2020 at 10:07:37 UTC, WebFreak001 wrote:
I was wondering, how are you supposed to use std.file : read in @safe code when it returns a void[] but you want to get all bytes in the file?

Is void[] really the correct type it should be returning instead of ubyte[] when it just reads a (binary) file to memory? Or should void[] actually be castable to ubyte[] in @safe code?

I definitely think it should return ubyte[].
void[] is a very special abstraction that shouldn't be used at all if you don't know very well what you're doing.

Reply via email to