6 ms·
I use Rust and C at work. I quite enjoy Rust, but I currently have no reason to believe C won't outlive it, by a lot.
by apitman 10mo ago
I use Rust and C at work. I quite enjoy Rust, but I currently have no reason to believe C won't outlive it, by a lot.
- po1nt 10mo agoWell, Fortran is still used somewhere too
- rahen 10mo agoYou mean everywhere. It's just hidden behind abstraction layers or Fortran libraries like BLAS/LAPACK, which are used by NumPy, R, Julia, MATLAB, Excel, TensorFlow, PyTorch (for some backends), and basically anything that involves linear algebra.
- hu3 10mo agoAnd I think Zig will gradually eat a large piece of the C pie that would otherwise be eaten by Rust.
- pjmlp 10mo agoI doubt it, unless it sorts out its use after free issues, embraces binary distribution used in commercial world, and gets adoption by an OS vendor.
- Zambyte 10mo agoYou can create and link to shared objects and create statically or dynamically linked executables. What more could you want on "embracing binary distribution"?
- opem 10mo agoJai is also on the que
- Y_Y 10mo ago¿Que jai?
- avadodin 10mo agoquec
- forgotpwd16 10mo agoNowadays, a language without public implementation/documentation isn't going to get any actual adoption.
- lukebitts 10mo agoAny moment now…
- apitman 10mo agoCurrently Zig has the same issues as Rust in this context, primarily depending on a compiler that's too complex for a single person to maintain if necessary. But in Zig's case it seems there's a pretty good chance that will change if they're able to drop LLVM in the future.
- pjmlp 10mo agoUntil specific industry standards like POSIX, all Khronos APIs, UNIX like systems get rewriten into something else, it is going to stay around. Hence why it should be a priority for WG14 to actually improve C's safety as well, unfortunately most members don't care, otherwise we would at least already have either fat pointers, or libraries like SDS on the standard by now.
- thristian 10mo agoIn 1983, AT&T released the fifth version of Unix, called "System V". Part of the release was an ABI specification for how the different parts of the system would talk to one another. Notably, the main portion of the spec described portable things like the file-format of executables, and the details for each supported platform were described in appendixes. The SysV ABI is still used to this day, although the specification itself has withered until only two chapters remain[1], and CPU vendors still publish "System V ABI appendix" documents for platforms that System V's authors could not have dreamed of[2]. C as an interface is going to be around for a very long time, like POSIX and OpenGL and the SysV ABI standard. C as an actual language might not - it might wind up as a set of variable types that other languages can map into and out of, like what happened to the rest of the SysV ABI specification. [1]: https://www.sco.com/developers/gabi/latest/contents.html https://www.sco.com/developers/gabi/latest/contents.html [2]: https://wiki.osdev.org/System_V_ABI#Documents https://wiki.osdev.org/System_V_ABI#Documents
- IshKebab 10mo agoThe C ABI will definitely stick around. That doesn't necessarily mean C will. (Though it probably will have a very drawn-out death.)
- apitman 10mo ago> Hence why it should be a priority for WG14 to actually improve C's safety as well Sorry should have been more clear. I'm talking specifically about C89, or maybe C99.
- pjmlp 10mo agoIt hardly makes a difference, regarding C's safety.
- mustache_kimono 10mo ago> I currently have no reason to believe C won't outlive it, by a lot. My reaction is kind of: "So what?" I really don't care about the relative lives of languages and don't really understand why anyone would. Unless I am wrong, there is still lots of COBOL we wish wasn't COBOL? And that reality doesn't sound like a celebration of COBOL? IMHO it would be completely amazing if magically something 10x better than Rust came along tomorrow, and I'd bet most Rust people would agree. Death should be welcomed after a well lived life. To me, the more interesting question is -- what if efforts like c2rust, Eurydice, TRACTOR and/or LLMs make translations more automatic and idiomatic? Maybe C will exist, but no one will be "writing" C in 20 years? Perhaps C persists like the COBOL zombie? Perhaps this zombification is a fate worse than death? Perhaps C becomes like Latin. Something students loath and are completely bored with, but are forced to learn simply as the ancient interface language for the next millennia. Is that winning? I'd much rather people were excited about tech/a language/a business/vibrant community, than, whatever it is, simply persisted, and sometimes I wish certain C people could see that.
- tormeh 10mo agoHonestly I'd be a bit disappointed if something better came along tomorrow. Just as we as an industry spent all this effort moving to Rust something better comes along? Lame. Obviously I want better languages to come out, but I'd either want a bit of warning or a slower pace so we as an industry don't totally "waste" tons of time on transitioning between short-lived languages. Thankfully languages need about 10 years to mature from 0.1 to production readiness, and industry happily ignores marginally (and moderately) better languages than what they're using, so this is not a realistic issue.
- mustache_kimono 10mo ago> Honestly I'd be a bit disappointed if something better came along tomorrow. You'd be disappointed if something 10x better came along tomorrow? I suppose you would you also be disappointed if magically we had economical fusion power, because you own utility stocks? Or we invented 10x better new car, because you already own an old car? Of course the world wouldn't immediately move to one thing or the other, etc., and we'd still have a 10x better thing? > Obviously I want better languages to come out, but I'd either want a bit of warning or a slower pace The purpose of this thought experiment is to say -- it's perfectly fine for things to live and die, if they must. We've had a second Cambrian period for PLs. It's perfectly alright if some don't live forever, including Rust, which I really like. In my thought experiment, Rust and C could also accept this new paradigm, and adapt, and perhaps become 10x better themselves. Though this is something heretofore C/C++ haven't done very well. IMHO new things don't preclude old things, and there mustn't be only one winner. > Thankfully languages need about 10 years to mature from 0.1 to production readiness, and industry happily ignores marginally (and moderately) better languages Which my thought experiment did as well? Read: This is a 10x improvement!
- testdelacc1 10mo agoNeither needs to outlive the other to be individually useful. The way I see it, the longer something is actively used, the greater the chance it’s going to stick around. I’m bullish on rust but I’m equally bullish that C will last a long, long time. But it’s not an either-or here. Both are good at certain things and can coexist. Like they’re coexisting in the Linux kernel for example.
- gritzko 10mo agoCorrect me if I am wrong, but C is the “greatest common denominator” for several decades already. Java, .NET, go, Rust are very much ecosystems-in-themselves. From the practical standpoint, they can not use each other’s code, but they all can use C libs.
- flohofwoe 10mo agoTechnically it's only the C API that's important, the implementation behind the C API can be written in any language. The downside is though that you still need a language toolchains X, Y, Z to compile the implementations. Transpiling everything to C removes that one dimension from the build process.
- VBprogrammer 10mo agoZig has been in the news a lot recently but I haven't explored it much other than a few tech talks which seemed interesting. I wonder if this is it's killer feature - compatibility with the C ABI.
- flohofwoe 10mo ago> compatibility with the C ABI Almost all non-C language offer that feature. The additional thing of the Zig toolchain is that it can also compile C/C++/ObjC projects without requiring a separate compiler toolchain, e.g. the Zig compiler toolchain is also a complete C/C++ compiler toolchain.
- VBprogrammer 10mo agoAlmost all languages provide a method of calling C generated code for sure. But, as I understand it, this is usually a more tortuous path than straight ABI compatibility.
- ahartmetz 10mo agoUnless something similar to but better than Rust comes along soon, I expect both Rust and C to live "forever".
- sakompella 10mo agoUnfortunately, I really doubt long rust's "forever" will last in the wake of the `time` crate controversy. I can't see like a lot of good options in that place from the perspectives of the rust-std maintainers, but it might've just been worth it to wait for a new edition or similar.
- antonvs 10mo agoWhy do you believe that's going to have some sort of lasting effect on Rust?
- sakompella 10mo agoI don't believe it'll have "lasting" effect on rust, but I think it rather shows what rust maintainers will do, if put into a similar situation again.
- Wowfunhappy 10mo agoIt also feels to me like Rust is trying to replace C++ more-so than C.
- drnick1 10mo agoThere SO MUCH C++ out there that it won't ever be replaced. For one, Rust (or plain C) isn't a good choice for big applications (GUI, video games, web browsers, and many others) where classic OOP is so useful.
- Wowfunhappy 10mo agoMaybe "replace" was the wrong word. What I mean is that Rust is "a better C++" to a much greater extent than it is "a better C".