4 ms·
The fact that Rust has a whole other ecosystem is the main thing that gives me pause. For all their faults, C and C++ targets the ecosystem you have: gems, pip,
by humanrebar 4y ago
The fact that Rust has a whole other ecosystem is the main thing that gives me pause. For all their faults, C and C++ targets the ecosystem you have: gems, pip, Conan, Nix, ...doesn't matter. They don't expect you to port to a new ecosystem. They can contort to meet your needs.
Herb Sutter's latest proposal and, to a slightly lesser degree, Carbon are more interesting in that respect.
- Ar-Curunir 4y agoWhat? You can totally compile Rust for compatibility with python libraries or Ruby libraries or whatever you want. Rust can offer the same API that C/C++ offer, so it can be a drop-in replacement.
- humanrebar 4y ago...as long as you're fine shelling out to cargo, right? What if that's not appropriate or ergonomic? There's a world where Rust is as easy to use as C, C++, Fortran, etc. outside of cargo, but it's not an interesting use case for the Rust community to support right now for whatever reason. That's basically my point. And it's common enough to have linked programs in which python calls C that calls C++ that calls Fortran that calls C. Replacing arbitrary layers with Rust is technically possible, though Rust doesn't tend to be deployed in situations like that, at least not yet. I'll consider the Rust ecosystem more mature when you see Rust used mixed ELF situations like that.
- ninefathom 4y ago"There's a world where Rust is as easy to use as C, C++, Fortran, etc. outside of cargo, but it's not an interesting use case for the Rust community to support right now for whatever reason. That's basically my point." Yep. The Rust ecosystem is very much a product of the always-connected, move-fast-and-break-things, DevOps-CI/CD-SCRUM-Agile, horizontal scaling world... which is fine right up until the point where it needs to be used outside of that world, at which point all hell breaks loose.
- nindalf 4y agoWhat a strange comment. It’s true that building Rust projects is easy with cargo and hard without. But how did you go from that to “move-fast-and-break-things”? Could you give an example of a broken thing? Is the Linux kernel “DevOps-CI/CD”? Does Linus Torvalds manage the project in a “SCRUM-Agile” way? Let’s find out if “all hell breaks loose” when we get Linux 6.1.
- unrealhoang 4y agoRust-for-Linux doesn't use cargo, yet no satan or demon appears anywhere. Yes, adding dependencies is not single line updated like Cargo-based workflow, but also not that much different than adding a C/C++ dependency.
- pornel 4y agoC/C++ target a fragmented mess that's different on every platform and inconsistent across projects. Technically you can invoke rustc the same way you invoke cc, and craft makefiles and handle all your dependencies the old way, but it's so tedious and fragile compared to Cargo that nobody wants to.
- humanrebar 4y agoIt's also possible to have simple enough C and C++ packaging. A lot of the problem is just inertia and education. But a lot of the problem is also that C and C++ are designed (if only implicitly) to work in all kinds of contexts as a feature.
- nicoburns 4y agoNope, C and C++ target the C and C++ ecosystem. If that’s the ecosystem you have then presumably that’s because your a C or C++ developer and that’s what you’re used to. Personally I find installing C and especially C++ libraries a massive pain.
- humanrebar 4y agoI can't speak to your experiences, but there isn't one C or C++ ecosystem. It's common to write C or C++ to target: ruby, python, Java, Linux distros, C++ package managers, numeric analysis ecosystems, OS kernel development, embedded ecosystems, game ecosystems, robotics, wasm, and JS ecosystems. And I'm positive that's not a complete list.