7 ms·
Ok, so I hate to be too direct but the rust enthusiasm always struck me as annoying like the meme about arch users telling everyone they use arch and so should
by noobermin 4y ago
Ok, so I hate to be too direct but the rust enthusiasm always struck me as annoying like the meme about arch users telling everyone they use arch and so should you, but on that token, I always felt it strange given it's literally over something as mundane as a programming language choice. BUT, this as a reason seems to explain a lot more for why evangelists, particularly those in management type positions in large IT companies are pushing rust so much. Wanting to weaken the economic position of a certain type of developer makes a lot more sense.
- woodruffw 4y ago> Wanting to weaken the economic position of a certain type of developer makes a lot more sense. Just more anecdata, but this isn't true for my company. We're hiring for Rust because we're seeing more and more clients take memory safety seriously (and ask specifically about it as a design consideration). These things have a way of balancing themselves out: developers like Rust, so there will probably be an eventual "glut" of Rust programmers like there was for C++ programmers in the 1990s. But it's a multiparadigm language, so I don't expect there to be consistent wage deflation based on that (and especially not in systems, where finding competent engineers is a perennial problem).
- snovv_crash 4y ago> we're seeing more and more clients take memory safety seriously Running your test suite with asan, msan, tsan isn't sufficient? From my experience you need to start doing really nasty things (which shouldn't pass code review) before the sanitizers won't find your issues.
- woodruffw 4y agoThere are plenty of things that ASan won’t catch, like misuse between contiguous allocations. But that’s sort of tangential: the goal is to write software that’s correct to begin with, not poke holes in it with the testsuite after the fact. With Rust, I can pick third-party dependencies that I can be (vanishingly) confident don’t have memory safety issues; when I start a greenfield C++ project, any dependencies I bring in are now potential sources of memory unsafety in my code.
- LtWorf 4y agoDo you vet all of your dependencies' code for unsoundness when using unsafe?
- woodruffw 4y agoOne of the guarantees that Unsafe Rust makes is that well-formed unsafe code cannot trigger unsoundness in safe code. In other words: I very rarely write unsafe code myself. When I bring in others’ unsafe code, I use cargo-geiger and siderophile (which I help maintain) to quantify it.
- LtWorf 4y agoIt's not a guaranteed guarantee as far as I can understand. Or such bugreports would make no sense: https://github.com/denoland/deno/issues/15020 https://github.com/denoland/deno/issues/15020
- woodruffw 4y agoThe bug report says exactly what I said: if you don't write well-formed Unsafe Rust, then Rust will not make any guarantees about invariant preservation in Safe Rust. This is exactly the same as in C++, except stronger: in C++, any piece of well-formed code can violate safe invariants. In Rust, only unsafe code can violate safe invariants, and can only do so if it isn't itself well-formed.
- rng_civ 4y agoAccording to the RustBelt paper [0]: > so long as the only unsafe code in a well-typed λRust program is confined to libraries that satisfy their verification conditions, the program is safe to execute. I think the main caveat is that IIRC, the RustBelt unsafe rules do not cover ALL uses of unsafe in the wild, they analyze only a subset of Rust as whole, and of course, unsafe usage actually has to obey the rules. But I'm hardly an expert here. That bug report basically says they broke the unsafe rules and thus the guarantee no longer holds (and there is UB). [0] https://dl.acm.org/doi/abs/10.1145/3158154 https://dl.acm.org/doi/abs/10.1145/3158154
- ssokolow 4y agoI'm reminded of this quote, written in support of more and stronger use of systems for formal verification, like powerful type systems: > Program testing can be a very effective way to show the presence of bugs, but it is hopelessly inadequate for showing their absence. -- Edsger W. Dijkstra, "The Humble Programmer" (1972)
- snovv_crash 4y agoOh for sure, use better types to express the problem in ways that the compiler can catch mistakes. But... you do need to show at some point that your code actually does what you claim it does, even if just for a single use case; might as well piggyback sanitizers since you're running tests anyways. Re: Dijkstra, I'm not trying to prove that the code has no memory errors, I'm trying to make sure none get triggered in production ie. the difference between computer science and software engineering. If there was a simple and easy way to do behaviour proofs I'd be happy to use that, but coq et al. are a real pain.
- Ar-Curunir 4y agoNo Rust Evangelist is out there thinking, "Hm, how do I put C/C++ developers out of business today"
- ncmncm 4y agoI see you do not have much contact with Rust evangelists.
- Qwertious 4y agoI think they're thinking "how do we get those C++ businesses to switch to Rust" rather than "how do I bankrupt them".
- ncmncm 4y agoThey're thinking "how do we get those C++ businesses to stop hiring C++ coders, and start hiring us Rust coders instead". The original purpose of Rust was to displace C, a laudable goal. But it is failing at that, because C coders are practically defined as people who will never switch to anything. (Any who might have did already.) So now the only hope is to displace C++ instead, and the propaganda machine is trying to paint C++ as equally as unsafe as C, which it manifestly is not, lying if that is what it takes.
- Tozen 4y agoWell, there is corporate financial interests involved, which is sure to push the propaganda machine into higher gear. Expect a lot more trash and FUD being thrown around by converted fanatics and speculators, in regards to all the "inferior" languages.
- kubb 4y agoWhat issue is there for the C++ developers to transition? Rust is a simpler language, with better characteristics. Memory safety is the a big selling point for the business people, but there is also a better module system, dependency management, better generics, no hidden memory allocation, etc. etc.
- IshKebab 4y agoI love that you can't accept the possibility that Rust is good so much that you had to come up with a genuine conspiracy theory to explain its popularity.
- cercatrova 4y agoSurely you're joking, because I simply refuse to believe that you think Rust developers are actually sitting around thinking how to put other devs out of a job instead of, you know, using Rust simply because it's a better, more well designed language.
- lttlrck 4y agoI didn't read it that way at all. I read it as: where can we find a lower cost (than C++) pool of developers. It's not particularly conspiratorial. Companies are always looking to expand their labor force and good C++ devs can be very expensive, so why would you want start a new project in C++? Security is another aspect altogether...
- zozbot234 4y agoCompanies don't care about cost, they care about bang for the buck. And this is where Rust has a clear advantage over C/C++, at least in many cases.
- spion 4y agoI'd actually prefer a GCed language, but Rust gets so many of the other things right that its still better than anything I've seen before (despite forcing a borrow checker on me).
- sophacles 4y agoBuggy whip manufacturers were also concerned that the car was just a conspiracy to drive them out of business.