Andrew M. Kuchling wrote:
The issue there is cross-platform compatibility; the Windows and Unix versions take completely different constructor arguments, so how should we paper over the differences?
Unix arguments: (file descriptor, size, flags, protection) Win32 arguments:(filename, tagname, size)
We could just say, "OK, the args are completely different between Win32 and Unix, despite it being the same function name". Maybe that's best, because there seems no way to reconcile those two different sets of arguments.
I don't get this. Why expose low-level implementation details to the user (flags, protection, tagname)? (And how come the Windows implementation doesn't support read-only vs. read/write flags?) Unless the current implementation uses something radically different from mmap/MapViewOfFile, wouldn't an interface like: (filename, mode="rb", size=entire file, offset=0) be sufficient? (where mode can be "wb" or "wb+" or "rb+", optionally without the "b") </F>