druntime redesign
Jacob Carlborg
doob at me.com
Wed May 6 07:54:31 UTC 2020
On 2020-05-02 22:24, IGotD- wrote:
> Some OSes don't support everything like memory mapped files and we
> should support this possibility as well.
Yes, I noticed this the hard way when I added support for iOS. It was
assumed to be Posix compatible but there are a couple of edge cases
where some system calls are not available.
> We should also try to isolate the OS independent functionality more.
> Convenience functions that doesn't need an OS should be broken out, or
> at least with switches be compiled isolated from the OS dependent code.
I agree. Everything that is platform specific should be in its own
package, with one sub-package for each platform. I managed to do this
when I added support for macOS to Mecca [1], turned out quite nice. The
only remaining version blocks outside the platform package was to select
the correct platform specific import.
[1] https://github.com/weka-io/mecca/pull/12
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list