libc dependency

Moritz Maxeiner via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 19 19:50:39 PDT 2017


On Monday, 19 June 2017 at 23:29:46 UTC, Steven Schveighoffer 
wrote:
> I don't know what's involved in creating those wrappers, but I 
> can't imagine it's difficult to do with D (it's probably 
> actually easier than in C/assembly).

Not difficult, but a tedious amount of work for no inherent 
benefit:
You would have to recreate the correct system call calling 
semantics for every operating system / hardware combination that 
D is supposed to run on.
I suggest reading [1] and [2] to get a feeling of the workload 
*just* for Linux.
My unsolicited opinion: Unless someone pays you (for whatever 
reason) to explicitly not use a libc, just use a well tested libc 
for system calls and be done with it.

[1] http://man7.org/linux/man-pages/man2/syscalls.2.html
[2] http://man7.org/linux/man-pages/man7/vdso.7.html


More information about the Digitalmars-d-learn mailing list