[MLton] MinGW port
Tue, 24 Aug 2004 09:26:37 +1000
If I may stick my nose in briefly in a non-contributory kind of way to
express a personal opinion...
| > If we just don't document the versions that exist,
| > we can slowly include more functionality until the
| > POSIX layer works.
| I am happy to continue to improve our Posix emulation, but I still
| think it's best in the meantime for functions that are not emulated to
| raise SysErr. A noop will cause too many hard to debug errors.
I also think SysErr is the way to go.
| > I think some of the critical MLton tools make use of
| > the POSIX layer, don't they? How can these tools
| > work in a native Win32 environment (unless they
| > all use the OS layer?)
| They might. I would have to investigate if we wanted to kill the
| Posix layer on MinGW. But it sounds like we're all in agreement that
| some form of unsupported function is best. So, I'm not gonna worry
| about this.
My opinion, based on observation of a number of large cross platform
projects, is that attempts to emulate Unixisms (eg Posix) which don't fit
naturally on Windows is a bad idea which leads ultimately to a lot of wasted
time and effort. If you want Posix on Windows, use Cygwin and remember
that the Posix bugs/differences in behaviour under Cygwin are still there
despite many person years of hard work and thought by some clever people.
Better to use Windows OS functionality from scratch where needed and to
write code which minimises those problem areas in the first place. Best to
start writing a Windows OS library to support that pathway now - boring but
ultimately probably very rewarding.