On Monday, 9 November 2015 at 08:49:08 UTC, J.Frank wrote:
Hm. "Maybe the stream is seekable, maybe it is not" is not really an option for a language that is supposed to be type safe.
It just isn't known at compile time. Files, especially on Unix, are interchangeable at compile time but offer different capabilities at run time.
Thank you for your solution, but this sounds more lika a hack.
Wrapper structs with alias this are basically how D does inheritance on a struct.