Hacker News new | past | comments | ask | show | jobs | submit login

That’s because Linux is very unique in treating the syscall boundary as the ABI. I’m not sure which other OSes do that. Maybe Windows? Not sure. Certainly none of the BSDs.



Linux is the only operating system that guarantees kernel binary interface stability. You can discard the entire user space and write dependency-free software that interfaces with Linux directly. You can even boot Linux straight into your own program and bring up the system yourself.

This single function is all you need to do literally anything on x86_64 Linux from writing to a file descriptor to graphics card ioctls:

https://github.com/matheusmoreira/liblinux/blob/master/sourc...

In all others, interfacing with the kernel directly eventually leads to breakage because the people in charge change the system calls. Go binaries broke on OS X because of this. We're not meant to bypass their system libraries.


That’s crazy that other os’s don’t do that


It’s not that crazy when you consider that C has been the lingua franca of OS development for 50 years with a very thin library interface that’s been ported to every single platform under the sun. That’s a pretty sane maintenance choice all things considered since every single other language linked against libc for those 50 years, especially since the underlying hardware and OS has evolved (easier to maintain a highly standardized C library with the high level semantics you wish to standardize vs magic values in registers that are fixed for the duration of that platform and sometimes even across platforms.

I think Go was the first language that tried to buck that trend and it did not go well (aside from Linux).


Windows doesn't




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: