3 ms·
Too complicated. Rust is more similar to C++ than it is to C.
by 37ef_ced3 5y ago
Too complicated. Rust is more similar to C++ than it is to C.
- eternityforest 5y agoWhat's wrong with that? Rust seems to be fully capable of doing low level things like drivers and kernels, so why would you choose less abstraction and safety instead of more?
- sk0g 5y agoIn a time where C++ exists, C still gets used. C interop is even easier in C++ than Rust IIRC, so given the choice, C++ would get the nod much earlier I'd imagine. That said, people use C because it forgoes abstractions and complications. Neither C++ nor Rust provide that experience. I think Go comes the closest, while being a bit nicer to work with overall.
- gefhfffh 5y agoC++ is way more complicated than Rust though.
- jack_pp 5y agoC++ has more features than Rust but you can limit yourself pretty severely and use "simple" features to get far more safety and convenience than C without having to wrap your mind around Rust.
- gefhfffh 5y agoTrue for your new project from scratch when you already sucked up C++ such that you know what&when. But at this point you know C++ pretty well (including all what you don't want to use, take a look at the CPP Core Guidelines), and using Rust is almost trivial, since Rust doesn't really introduce anything really new you wouldn't be already familiar with. At least that was my experience.
- pjmlp 5y agoDue to UNIX clones, and religious cargo cult on some embedded circles.
- nicoburns 5y agoI’d say zig is closest C replacement.
- eggy 5y agoI agree, and much easier than Rust to get going and then some. Other than playing with Nannou in Rust to 'get' the language, and the Rust book, I started a toy game in Zig without more than the skeleton put together here: https://github.com/michal-z/zig-gamedev https://github.com/michal-z/zig-gamedev I like Raylib, and there are bindings for most popular languages, but I like the minimalism I can start with fairly quickly in Zig. I tried Bevy for Rust, but it is a lot more involved, and Rust, so Zig it is for now. For safety, and high-integrity software, I am sticking with SPARK2014. Rust will get there soon, but Ada/SPARK2014 have such a lead, maturity, and industry take up that I am putting Rust down for another year or more.
- eternityforest 5y agoI kinda wish SPARK were mainstream. Ada kind of aims for the same things as Rust, but it's been around such a long time. It's amazing how long C has stayed around.
- Tozen 5y agoThat's a bit debatable. Vlang is right there too. This would all be relative to what people are trying to do. Many people might really be looking for a C and C++ replacement, of which there are a number of viable alternatives (including good old Object Pascal), but then preferences and other factors makes things cloudy.
- eternityforest 5y agoRust is the one Torvalds seems most interested in, and I suspect that's a deciding factor. Zig might be the most direct upgrade from C, but it seems like rust can mostly replace the entire concept of portable assembly, since it has zero cost abstractions.
- eternityforest 5y agoThe question is whether they should be foregoing those abstractions and complications. C is not a language known for high security or reliability, nor is it known for being fast or easy to develop in, so by my guess based on vague anecdotal evidence, it seems that defaulting to the highest level of abstraction unless forced to do otherwise by some specific requirement is a better plan. C and direct C replacements advertise simplicity, but if the simplicity doesn't buy you any reliability in practice, why bother with it?
- PaulDavisThe1st 5y ago> That said, people use C because it forgoes abstractions and complications. Neither C++ nor Rust provide that experience. There's almost no C code you could write in an effort to "forego abstractions and complications" that isn't also C++.
- wejick 5y agoI tried multiple times to grok rust, but it's still too difficult for me to understand and be comfortable. In contrary go other than the struggle of unused variable compile error, I can use it within hours.
- thayne 5y agoMaybe. But it's still closer to C than go is.