4 ms·
Is C even worth saving at this point? Even standards committee members can't consistently write C code that doesn't overflow and segfault.
by creshal 2mo ago
Is C even worth saving at this point? Even standards committee members can't consistently write C code that doesn't overflow and segfault.
- dummydummy1234 2mo agoWhat other cross-language abi do you propose?
- pjmlp 2mo agoWhat everyone else is doing, COM, XPC, Android IDL, FIDL, D-BUS, gRPC,... Especially more relevant when going with microservices, microkernels, serverless, static linking (and still have plugins),...
- bigfishrunning 2mo agoThose are all RPC mechanisms, not an ABI. They exist at a much higher level. You could have an RPC protocol be your only interface to the OS, and that would be a valid design, but would have a performance cost (see the classic Tanenbaum–Torvalds debate)
- pjmlp 2mo agoNope, when you use in-proc calls, which some of them do support, they become an ABI as well.
- zbentley 2mo agoThe subset of the list that supports in-process calls and which allows for zero-copy (and, realistically, probably mutually mutable) data sharing of its types is shorter still. I think the useful definition of "ABI" includes more than just API discoverability (aka what D-Bus provides if you take away the RPC system).
- wasmperson 2mo ago> Those are all RPC mechanisms, not an ABI I'm not sure about the others, but COM is an ABI. There's a bunch of stuff surrounding it that is RPC-like but the core specification is just binary layouts and calling conventions. It's arguably more cross-language than the C ABI since it lets you generate type-safe bindings for any language, unlike in the latter where you need to parse header files. > You could have an RPC protocol be your only interface to the OS, and that would be a valid design, but would have a performance cost Maybe it would, but I doubt anybody would notice. The whole "everything is a file" concept on unix is basically just this (also X11/Wayland).
- creshal 2mo agoPreferably one that doesn't deliberately shoot itself in the face to spite its users just to protect some committee members' egos.
- deleted 2mo ago[deleted]
- groundzeros2015 2mo agoYes, it’s the most useful programming language you can learn.
- lioeters 2mo ago> Is C even worth saving C doesn't need saving, it will continue to survive on its own and even flourish in niches for decades to come. So will "Java"Script. Worse is Better, respectfully, or at least Old and Simple is Tough as F, living long and prosper. See, C doesn't need you but we need C, apparently for the foreseeable future.
- hn_submit 2mo agoC will not die but it will simply fade away. Rust is the new black and it will supplant C/C++ and almost everything else short of virtual machine languages like Java/C#.