On Friday, August 24, 2018 6:05:40 AM MDT Mike Franklin via Digitalmars-d wrote: > > You're basically trying to bypass the OS' public API if you're > > trying to bypass libc. > > No I'm trying to bypass libc and use the OS API directly.
And my point is that most OSes consider libc to be their OS API (Linux doesn't, but it's very much abnormal in that respect). Trying to bypass it means reimplementing core OS functionality and risking all of the bugs that go with it. It's also _far_ less portable - especially on *nix systems where the POSIX API gives you what you need in a mostly cross-platform manner (whereas syscalls aren't cross-platform at all). Trying to skip libc to call syscalls directly means that D programs risk not acting like programs written in other languages doing the same thing, and it seriously increases the maintenance cost, because then we have to worry about implementing core libc functionality that we currently get simply by linking against libc. I honestly don't see how attempting to divorce druntime from libc does anything but increase the amount of work that we have to do and increase the likelihood that basic OS functionality is going to be buggy, since we will have then reimplemented it rather than using the same core OS functionality that everyone else is using. If you're talking about avoiding libc functions like strcmp that's one thing, but if you're talking about reimplementing stuff that uses syscalls, then honestly, I think that you're crazy. Even if we were overflowing with extra manpower, I would think that that was a terrible idea, and given that we're _not_ overflowing with extra manpower, it's an even worse idea. - Jonathan M Davis