8 ms·
It's become clear to me that a lot of the Rust fanatics don't actually know how C++ works and and Rust is their first low-level language. The ones I'm talking a
by stochastic_monk 9y ago
It's become clear to me that a lot of the Rust fanatics don't actually know how C++ works and and Rust is their first low-level language. The ones I'm talking about know enough to make them sound like they know what they're talking about unless you actually know what they're trying and failing to accurately describe.
It sounds and seems like a language worthy of more investigation on my part, but I have to agree that the militant, presumptive attacks on any language besides their Chosen One has left a bad taste in my mouth.
- vvanders 9y agoThere are those of us who have been writing C++ for decades and are sick of the footguns and build systems but have never had a viable alternative before. I don't think anyone is arguing that we should throw everything out, however for all my greenfield stuff Rust has been a welcome breath of fresh air. Yeah, there are some people who are a little too over the top but a large part of the support behind Rust is from those of us who've used it in production and found it to be a fantastic language and ecosystem.
- Avshalom 9y ago(well I mean there has been Ada* for ages) *or fortran or pascal
- rufius 9y agoThe tool chain there is still quite irritating and “old school”. At least for me, part of the attraction of Rust is the development tools around the language itself (e.g. cargo).
- vvanders 9y agoYeah, in no particular order here's what I love about cargo: Seamless cross-compile. I've done a ton of cross-compile projects, cargo/rustup is the best by far. One-line dependency import. Saves *hours* setting up build chains. First-class win32 support. Hard to stress how rare and awesome this is coming from a gamedev background. Integrated testing. So nice just to have. Integrated benchmarking, ditto above.
- deleted 9y ago[deleted]
- oscargrouch 9y ago> I don't think anyone is arguing that we should throw everything out, however for all my greenfield stuff Rust has been a welcome breath of fresh air. If you can write things from scratch in a clear room fashion, perhaps. C++ is very good, when you need to integrate a lot of 'low-level' libraries (that are alredy in C or C++) together in a meaninful way, like for instance, browsers do. Like the capacity to 'talk' with FFMPEG, levelDB, linux, etc.. in a complete native fashion basically. I think in that regard Rust is sort of late to the party, and will find a wall hard to beat down, once the adoption rate get some maturity. If you are already a experienced C++ dev, compared to modern C++, Rust has very little to offer. Of course is more modern, (maybe) more ergonomic? But little things like package manager or explicit lifetime management by itself wont cut it.. at least not for people with large codebases already in C++. When you are younger, programming languages look like that secret ingredient that will turn whatever you do into a magical tool.. But experience tells you that nothing beats hard work or that you should understand the strenght and weakness of each language, and know when and how to use it. So for the problem domains where C++ are being used, it will get hard to beat, because a lot of great software are already there, and can be integrated in a native fashion, with whatever you do on top of it. And by the way, modern C++ is already secure enough, making some selling points for Rust, a little bit of cosmetic right now. If you throw a language like Swift into the equation.. particularly i think they(C++ and Swift) form a lovely and unbeatable couple.
- vvanders 9y agoI mean this in the most non-confrontational way: have you actually used/looked at Rust? The reason I ask is just about every item you laid out I've had the opposite experience. Talking with C/C++ is trivial with bindgen and clang. Embedding in C++ is likewise straightforward. I mean Firefox is one of the larger C++ codebases out there. The package manager is great and makes dropping in things much less painful. On the security front I don't think you can compare the two, I can easily think of things like iterator invalidation that C++ just doesn't handle well. The last big project I did in Rust ran on 6 different targets(x68 win32/linux/osx, android armv7/x86, wasm) targeting 3 different rendering stacks(OpenGL, HTML Canvas, Android Views) integrated deeply with a Lua interpreter. Having done cross-platform stuff like this in the past it was a build/toolchain nightmare. With Rust everything was straightforward and pretty darn painless.
- HumanDrivenDev 9y agoIt sounds and seems like a language worthy of more investigation on my part, but I have to agree that the militant, presumptive attacks on any language besides their Chosen One has left a bad taste in my mouth. This 100 times over. It's a language that seems novel and strong enough to stand on its own merits - but there's a section of the community that makes me want to stay away. I wish they'd spend less effort re-writing already working tools in C and more effort writing new, better tools. A drop in replacement for "ls" isn't that exciting for me.
- vvanders 9y agoPretty sure that's already happening with tools like ripgrep: https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep
- cies 9y ago> A drop in replacement for "ls" isn't that exciting for me. And a good getting your feet wet project for someone else :)
- rdc12 9y agoOn the other hand part of the complaint in the main article is the lack of basic core utils at a standard that OpenBSD would consider. Or things that could be a base world dependency for them.
- HumanDrivenDev 9y agoBut that ties into what I'm saying - trying to 'oxidise' a system written in C that already works.
- rdc12 9y agoOr to put it another way, find something new and valuable as your Trojan horse?
- shmerl 9y agoOpenBSD developers themselves did that, rewriting a lot of things that already worked. But they wanted to improve them security wise. So your argument doesn't fit with what they did already. Language is tangential here. Their main focus was security. So it's pretty reasonable to ask, why things can't be rewritten in Rust to improve security further. Note, that the answer doesn't say that it can't benefit security, which would be a principal argument for OpenBSD. It brings side reasons as to why it's not easy to do (like integrated tools, developers' availability and so on).
- vesak 9y ago>It's become clear to me that a lot of the Rust fanatics don't actually know how C++ works and and Rust is their first low-level language. Why would not knowing C++ bar people from anything? It's a wildly specific skill, diminishing in importance every day.
- pcwalton 9y ago> It's become clear to me that a lot of the Rust fanatics don't actually know how C++ works and and Rust is their first low-level language. That doesn't change the fact that Rust programs are, when memory safety is concerned, more secure than C++ programs. This is true both in theory and in practice.