3 ms·
Not just Rust, but every language will need to interface with C sooner or later. And not just to the OS, but to the window manager, graphics APIs, libraries (ff
by dzaima 5y ago
Not just Rust, but every language will need to interface with C sooner or later. And not just to the OS, but to the window manager, graphics APIs, libraries (ffmpeg etc). So, unless you think that C is the perfect language for doing literally everything, this still is a problem.
Assembly won't at all help you because the interface to anything other than syscalls (which are stable pretty much only on linux, and linux isn't the only operating system) is the C ABI for the specific OS & architecture combination. Yes, C works pretty much everywhere, but thus every language needing to support C is a mess.
- Annatar 5y agoFortran doesn't need libc to make syscalls. (And Linux was the very last kernel which begat stable syscalls: HP-UX, IRIX, Solaris and illumos have all had stable syscalls for several decades.)
- dzaima 5y agoDoes fortran use syscalls on BSD, macOS, Android, iOS, and Windows too? But, again, the OS isn't even the main problem. There are many orders of magnitudes more libraries that use the C ABI as their interface than what OSes provide through syscalls.
- Annatar 5y agoYes, of course it does: libfortran implements the same or similar things libc does; in order to do that, it has to make system calls.