3 ms·
> Every language ends up having to deal with either hardware or system libraries There's a big difference between using a C library which does extra processing
by viraptor 3y ago
> Every language ends up having to deal with either hardware or system libraries
There's a big difference between using a C library which does extra processing + maybe uses some syscalls and doing the syscalls directly. The interface is much stricter for the system interface and the memory ownership is better defined. You don't have to think about the library using a different allocator than the app does.
So no, I wouldn't say every language needs to do that. Golang definitely didn't https://github.com/golang/go/issues/36435 https://github.com/golang/go/issues/36435
- bhawks 3y agoThe OpenBSD way of one blessed libc as the interface to the operating system is perfectly fine for their project. The Linux kernel is a separate project from the several different libc implementations and the Linux kernel project treats the syscall API as a first class contract. If a language wants to use it directly for some reason that is an option on the table.