On 8/24/18 6:16 PM, Jonathan M Davis wrote:
On Friday, August 24, 2018 7:46:57 AM MDT Mike Franklin via Digitalmars-d
wrote:
On Friday, 24 August 2018 at 13:21:25 UTC, Jonathan M Davis wrote:
I think that you're crazy.

No, I just see more potential in D than you do.

To be clear, I'm not calling you crazy in general. I'm calling the idea of
bypassing libc to call syscalls directly under any kind of normal
circumstances crazy. There is tons of work to be done around here to improve
D, and IMHO, reimplementing OS functions just because they're written in C
is a total waste of time and an invitation for bugs - in addition to making
the druntime code that much less portable, since it bypasses the API layer
that was standardized for POSIX systems.

Let me say that I both agree with Jonathan and with Mike.

I think we should reduce Phobos dependence on the user-library part of libc, while at the same time, not re-inventing how the OS bindings are called. For example, using Martin's std.io library instead of <stdio.h>.

I really don't want to see dlang have to maintain posix system calls on all supported OSes when that's already being done for us.

Windows makes this simpler -- the system calls are separate from the C runtime. It would be nice if Posix systems were that way, but it's both silly to reinvent the system calls (they are on every OS anyways, and in shared-library form), and a maintenance nightmare.

For platforms that DON'T have an OS abstraction, or it's split out from the user library part of libc, it would be perfectly acceptable to write a shim there if needed. I'd be surprised if it's not already present in C form.

-Steve

Reply via email to