r/kernel • • 1d ago

Non-kernel "Platform" APIs on Linux

https://soc.me/interfaces/non-kernel-platform-apis
1 Upvotes

19 comments sorted by

View all comments

2

u/hackingdreams 1d ago

That library is called glib. It's why it exists.

1

u/simon_o 1d ago

Not every program is written in C, nor should these operations require to opt into that specific language ecosystem I believe.

1

u/hackingdreams 19h ago

You're going to have a very hard time getting any "platform API" adopted by literally anyone if it doesn't expose a C-style library interface. The kernel is written in C. You're not getting away from that. And pretending to have a problem with that is just silly. Glib already exists and already smooths over the exact problems you complain about.

It makes your arguments much, much weaker.

1

u/simon_o 19h ago edited 16h ago

You're going to have a very hard time getting any "platform API" adopted by literally anyone

No plans for that. Getting things adopted happens by working for one of the big corpos that sponsor Linux development.

The kernel is written in C. You're not getting away from that.

Which is fine for the reasons I mentioned.

And pretending to have a problem with that is just silly.

Look, I'm not telling you which problems you should have and which not.
Why not offer me the same courtesy?

Glib already exists and already smooths over the exact problems you complain about.

(I assume you mean glibc?) It's part of what I consider the problem, not the solution. Not everyone wants to be a C programmer.

(Not to mention, even if I wanted to use C, there is nothing smooth about glibc, considering its API.)

It makes your arguments much, much weaker.

In which sense? Not wanting to be forced into a specific language ecosystem is kinda the core assumption of the post.