4 ms·
I really like Rust. I like C, and C++ too. I find a lot of C++ and C detractors are nit-picking and over-promising the-new-shiny-thing, or are probably not grea
by flumpcakes 4y ago
I really like Rust. I like C, and C++ too. I find a lot of C++ and C detractors are nit-picking and over-promising the-new-shiny-thing, or are probably not great engineers to begin with and are blaming the tool. In this instance, I'm leaning towards the latter.
Although Rust is an improvement in many ways, I actually think it is becoming more C++ like with every release. I think it has a good chance of over-taking C++'s complexity, even if it has a much better user story around build & package/module/library management.
- pdimitar 4y agoAs a guy who is writing Rust and found it a true value-add in his career, I agree with this and it's my #1 worry. Rust can already be very arcane to decipher sometimes, especially when you start getting errors from async libraries. My entirely egotistical opinion is that the maintainers of the language have to take a very good and critical look of the current status quo and start systematically killing off any complexity they can. Personally I don't want C++ 2.0. Tire people enough and they'll just move to another language again. I know I have, several times in my career, and will do so again if I have to.
- spoiler 4y ago> Rust can already be very arcane to decipher sometimes, especially when you start getting errors from async libraries. For what it's worth, the community, library authors, and most importantly the language design teams are all very aware of this. And there's efforts being made to make all these pain points things more ergonomics and approachable. I think it just a slower process than we'd like. I think in part it's so slow might be due to how the decision making and work is structured; it's very open, but also slow. Stuff like GATs took ages to design and implement, and yeet and parts of async are similar. These are done very carefully and they also let decisions marinate for a while before further action. It's not a critique, since I think it's good and wouldn't know a recommendation to speed it up. So, it's getting better, but slowly
- flumpcakes 4y agoI think GATs in Rust are really cool. Just like template meta programming in C++ is really cool (despite the countless articles on why it shouldn't be used by mere mortals in production code--it's too powerful and unwieldy!). I worry that Rust will become just as arcane as C++ but will look better at a surface level because it has modern and sane defaults and not 40 years of baggage. Perhaps I'm worried I'm just not smart enough to be a Rust programmer. Off topic: I also find the Rust community unwelcoming and very clique-ish, I get the very strong "you're not apart of the cool gang" vibes and I'm too old to care to navigate this.
- spoiler 4y agoI do understand what you mean abou complexity creep, and hope it doesn't happen, but also fear that it might in due time. The thing about GAT is that it was never meant to be a feature. It just removes a non-obvious limitation from the language. I remember when learning Rust, I expected "GAT syntax" to just work, and was surprised when it didn't. So, for me it makes the language less arcane. > Perhaps I'm worried I'm just not smart enough to be a Rust programmer. I think everyone can learn anything. It's just a matter of finding the right angle to understand a concept. If something hasn't click, force yourself to use those parts until they do. > Off topic: I also find the Rust community unwelcoming and very clique-ish, I get the very strong "you're not apart of the cool gang" vibes and I'm too old to care to navigate this. Ah maybe. I've not experienced this personally, but I've seen others make similar claims. It's generally aways very welcoming from what I've seen. There's the occasional smartass on their Discord, but that's just... Discord Things(TM). People ignore them, and if they're obnoxious they get called out and asked to chill out a bit. Out of curiosity, what are your main interaction channels/places with the community? Maybe you just accidentally navigated into ones that don't suit you personally
- pdimitar 4y ago50 / 50. I find the Rust Users discourse forum to be generally welcoming, though sometimes it seems people find your question too obvious and nobody ever responds. I found that showing that I made an effort and pointing at my source of confusion increases engagement. But it might be sensitive to timezones or such as well, no idea. Rust's Discord however is AMAZINGLY friendly. I've been contacted in DMs by maintainers of very prominent and popular libraries by outlining a problem that I had, in detail. And finally, r/rust I witnessed first-hand being extremely toxic at times. It really depends where you're looking.
- quectophoton 4y agoI also really like Rust, and I see it as a good replacement of C++, except for one reason: the monoculture around it. You are expected to use one specific compiler. And there's very little (apparent) interest in actually writing a spec, so that other people can actually try to implement their own compilers with a working borrow checker, compilers capable of compiling rustc without sacrificing soundness (so far the compilers I've seen are lacking borrow checker, for example). My only remaining hope rests on the Ferrocene people. So I can see why Rust is being used for user applications, but until that monoculture issue is fixed, I don't really see it replacing C, C++, much less SPARK, as a language for critical systems. It is my sincere hope that having Rust in the Linux kernel, and in GCC, results in Rust getting an actual spec, so that we can finally know what is expected compiler behavior and what is a bug in rustc, other than "what the rustc from this specific repository does". Like, for example, Rust 2018 edition is frozen (AFAIK), so that would be a good target for a baseline spec. Could be a more recent edition, even; it doesn't really matter as long as it's something.
- humanrebar 4y ago> ...it has a much better user story around build & package/module/library management Cargo sure does, but support for rust outside of cargo is much, much worse than equivalent support for C and C++. It doesn't matter for self-contained projects like simple Makefile ones, but at large scales, moving everything to cargo doesn't seem reasonable right now. Maybe eventually?
- eddsh1994 4y agoThis is the one issue I personally have with C++. How do I `pip install boost`?
- humanrebar 4y agoNote that a lot of the pip projects are implemented in C++. You install packages for the environment you are targeting. A lot of folks use Conan or vcpkg for pure C++ dev.
- eddsh1994 4y agoSorry, I was using `pip` as an example of an easy build system to use to get stuff working. Is it as simple as `conan install boost` within a projects dir?
- humanrebar 4y agoIt's more or less as easy and hard as pip dependency management, yes. Including deducing sets of valid version ranges and so on.
- Volt 4y agoUse your OS's package manager.
- flumpcakes 4y agoI strongly agree with this. Everyone complains about C and C++ build systems, but they were designed to be easy to begin with. Then projects grew in size and there wasn't a "standard" way to do things so people came up with their own systems. We now seem to be standardizing around CMake for better or worse. On the flip side, Rust makes the usual cause very easy, with the ability to to pull in code with a single line in a config file (I would argue this is probably a double edged sword - I've some some Rust projects that look like they're a javascript project with a thousand dependencies). I think the "simple" case of compiling Rust without cargo is more complicated and has a higher friction. Perhaps this isn't fair, complaining about Rust's build system when you're off the beaten path because it's difficult with loose footing. C++ doesn't really have a beaten path (Well since C++17 it's slowly become CMake), that's why all the routes are so well trodden...
- Shorel 4y agoYes, and competition is good. Rust is good and I expect they keep making great things. C++ is also becoming better with every release, and C++20 is a huge improvement. In all honesty, code written in C++20 feels just like code I have written in Python and/or JavaScript. And 20–40 times faster.