5 ms·
There's aggressive language advocacy, and then there's passing into parody. I think you're getting perilously close to the latter here.
by jerf 2y ago
There's aggressive language advocacy, and then there's passing into parody. I think you're getting perilously close to the latter here.
- anonym29 2y agoAnyone have any idea what makes Rust evangelists / apologists so religious about it? It's not like it's the only high-performance memory safe language. It wasn't the first. It's not the highest performance. What am I missing?
- Pannoniae 2y ago1. It's highly opionated so there's a cult-like element of an ingroup/outgroup, e.g. "we don't have OOP, OOP is bad! if you use it, you are an outsider and we can do things better in Rustland here!" 2. It's posed as an alternative to C/C++ which have many historical problems. It's very easy to construct a strawman to show Rust is so much better than those ancient languages. ("here's this trivial buffer overflow bug Rust could have prevented!") 3. It's low-level enough that people feel 1337 for using it but not low-level enough to actually require low-level skills to use it. This is why you can see how in many cases, the "solution" to the borrow checker is just cloning everything - because they have zero idea about how to make performant programs. 4. It doesn't have many established libraries/frameworks compared to other languages, so "I wrote X but Rust" is a viable thing. In other languages, this wouldn't stand because there are already established libraries so interest in new ones is not as high + there are certain quality standards you have to meet. 5. It has certain high-profile features which are easy to explain why they are better - option types and slices for example. These Rustaceans are usually not exposed to functional programming before - so they start to embrace simple forms of functional programming. It makes Rust programs look fairly different compared to similar languages, which is another differentiator. It's easy to showcase the advantages of these features in code snippets, which makes it easy to evangelise.
- PeterWhittaker 2y agoWe don't have a lot of place for religion in my industry, and safe, performant low level code is everything. Writing and debugging such code in Rust is just easier and faster than in C. Two years ago I was casually learning Rust by night while by day I was extending a scheduler I had previously written in C. I kept wishing I could switch, because I kept having to handcraft in C things I would have gotten for nearly free in Rust. Now, we're designing the Rust replacement for that C program, and it is taking all my will power not to start coding it: that job falls to someone else, and I am wistful about it. Not because I am going to miss the C code, but because it would just be so much fun to do in Rust.
- uecker 2y agoNot sure you are trolling us or not, but there is a bit of a contradiction between "here is a huge learning curve to Rust, one that I am still climbing," in the comment above and "is just easier and faster than in C". It is certainly true that you have a lot of things you can easily have at your fingertips with cargo in Rust, which you might need to first identify or even handcraft (if you have no existing framework to rely on) in C. On the other hand, I am not sure this is a good thing. I am a bit skeptical about the cargo / NPM style of package management.
- littlestymaar 2y ago> but there is a bit of a contradiction between "here is a huge learning curve to Rust, one that I am still climbing," in the comment above and "is just easier and faster than in C I see no contradiction when you realize that no one has ever been proficient enough in C to write code that is free from UB… The problem with C is that cannot realistically be written by humans, so pretty much any language (except C++ …) is going to be “easier than C”.
- segfaltnh 2y agoWild claims. So many huge projects have been successfully written in C by humans. There are patterns to solve all the built in solutions provided by Rust, how do you imagine Rust got them in the first place? One tiny example of many here is the Linux kernel.
- pdimitar 2y agoI'd say we didn't have many options back then except for C and no more than 4-5 others. So we did the things you quoted _despite_ C's drawbacks, not because of them. I can very easily imagine doing the same things with Rust, with small amount of exceptions (that the core team is working on even now). And yes Rust learned from the mistakes of the languages before it. Is that a bad thing?
- Const-me 2y agoJava and C# runtimes are getting memory safety at the cost of RAM usage in runtime, to lesser extent CPU overhead in runtime. Rust is getting memory safety at the cost of cognitive load of developers. Due to this tradeoff, by design Rust is extremely hard to use. Some people still learn the language despite the learning curve, then fall to sunk cost fallacy. Another thing, it’s obvious people who designed Rust liked functional programming, so Rust attracts FP programmers. In the online communities, functional programmers are known for over-the-top evangelism for decades now.
- cozzyd 2y agoFor a brief history of the origins of rust evangelism, I recommend you consult this article: https://en.wikipedia.org/wiki/Cargo_cult https://en.wikipedia.org/wiki/Cargo_cult
- karmakurtisaani 2y agoJust when the rust hype train was getting annoying, the anti-rust hysteria becomes even more so. Besides, cargo cult is simply the wrong concept to point out here.
- littlestymaar 2y agoWhile I agree that Rust advocates can be annoying at times, your last paragraph confuses me: which language do you have in mind that is both memory-safe and higher performance than Rust? Rust is legitimately special: being memory safe without any kind of garbage collection (I include ref-counting here). That's what enables its deployment in stuff like QEMU or the Linux kernel.
- karmakurtisaani 2y agoAlso, rust is legitimately a nice language. I get it that people get annoyed over the hype, but then they start acting like people like it just because they're morons who can't think for themselves.
- segfaltnh 2y agoAgreed. I feel gaslit by the gap here. I too find the hypesters annoying, but it's fun to hack on Rust code usually. Usually...
- uecker 2y agoThere is the theory that Rust people constantly have to reassure themselves that the language is great and the future, so that can bear the suffering from using it.
- PeterWhittaker 2y agoIf you say so. Considering that you can define the basics of a memory and thread safety for free JSON parser in a single enum in Rust, and derive a lot of utility functions, where C would take a lot more code, and the code would be riskier, well, I'm just going to keep enjoying working in the language. It has a lovely balance of power and conciseness. There is a huge learning curve to Rust, one that I am still climbing, but I haven't been as excited learning and working with a new language since 1987 when I learned C afters years of working with Pascal, Fortran, and a number of procedural job control systems. In the years since, I've written large complex programs and systems in C, JS, bash, and PowrShell, and so far Rust feels like my new forever home, my defauly go to. I'm glad of this, because my industry is heading to memory-safe, compiled languages, and the others I've experienced don't work for me. It's aesthetic, mostly, I guess, but Rust just makes sense.
- jerf 2y agoAnd there you go, you've passed the line. In response to a suggestion that maybe you could tone it down a bit, you just repeat the party line again, because a slight opening has been spotted and by golly you're not going to let that pass! You're hurting more than you're helping at this point. And, just in case you're having trouble following along, as the evidence rather suggests that you are, note that replying with yet another paeon to Rust will be really missing the point.
- PeterWhittaker 2y agoWell, it's nice on this side of the line. There is no party line, and there is no tone. There are over 30 years of experience with C, not all of it pleasant, though most of it productive, and, comparatively speaking, amazing recent experiences with Rust. I do have to shift my thinking from how I would solve problems in C, because the memory management paradigm is so different, but, thanks in part to deep dives into scoping in other languages in pursuit of pernicious bugs, once I make that shift, problems are easier to solve in Rust: The language and the compiler, hand in glove, do a lot of the work for you. You can carp all you like, and that is all it is, carping, not criticism, we'll just happily work along getting a lot done in less time.