I don't know if this is a comment about rust the language or reddit commenters.
Rust does attract a weird subgroup of people who can get preachy and pushy about there only being one way to do things.
But the helpful part of the community is much bigger and much better to work with. You just have to look past the loud people pushing agendas and stay out of flamewars on Reddit and HN.
The only community that’s been just as wonderful is the TypeScript community on Discord. Gosh they set the bar high for expectations on getting language help.
I've seen more comments talking about this supposed phenomenon than instances of this phenomenon actually happening. I haven't really seen any examples of preaching and cult-like reactions, I just see people talking about how it supposedly exists somewhere.
I agree with you that it can be really off-putting. From my perspective what you are seeing could be more of a comment on some of the know-it-all dilettante types who fawn over trendy tech in comment sections than the rust community itself. I've always had great experiences when reaching out for help in discords, user forums or other spaces. I've seen similar patterns with other trendy technologies in the past too.
I want to have a function that returns the UTC now as a string. Now what? Opening a question on SO -> question closed, here is a question about &str and String that has nothing to do with the use case and everything about the implementation details of &str. Good stuff.
I think the creator of Rust assume that if they explain where a piece of data is allocated suddenly everybody is going to be on the same page about the use of that data.
Using borrowed values in general in fields is best avoided until you get more comfortable with the rest of the language.
If you are struggling to learn these things, even after working through the Rust book and other commonly cited resources, my suggestion would be to drop Rust for now and learn C. In C, pointers, stack/heap, malloc/free are things you have to deal with directly, so you can see how things work under the hood. And then, when you go back to Rust, you can map your hard-earned C understanding to the Rust abstractions
> Most devs new to Rust do not understand &str and String and 99% of the content about is how implementation details
Looking at doc like this:
https://doc.rust-lang.org/rust-by-example/std/str.html
https://stackoverflow.com/questions/24158114/what-are-the-di...
Which part didn't convey the info you wanted? How would you convey it?
Curse of Knowledge is real, so to me it looks trivial, but I started Rust before str/String were a thing. I don't know what it's like to start learning Rust.
> I want to have a function that returns the UTC now as a string. Now what? Opening a question on SO -> question closed, here is a question about &str and String that has nothing to do with the use case.
That's on Stack Overflow overzealous moderation. If I had a dollar for every question of mine that was closed with mark as duplicate, I'd be a richer man. Doesn't mean it was specifically Rust community.
Did you consider Rust Discord? I asked few very technical questions and I got some really good answers.
I agree. I usually teach with example. Sort of here is a situation, this is your input now write something (a function, sql statement, etc.) to produce the desired outcome. While doing so I explain all the relevant details (this might be a good time to talk about different allocations for example).
This works surprisingly well. If you reverse the order (talk about different allocations first) the student need to connect the dots later.
I found my approach working better.
Anyways, it might be only me.
>> Did you consider Rust Discord?
I will try that.
That said, being an outsider, I'm reminded of this quote from a recent article:
> "What was the deal with [person X] on your team, why are they such a jerk?" (Sadly, if you worked on Chrome you probably know exactly who I'm talking about.) The experience gave me an appreciation for how a group, especially a faceless internet group, can be perceived by its worst behavior.
Source: https://neugierig.org/software/blog/2022/12/chrome.html
I'm not quite sure why the Rust community is so dogmatic about the language's intrinsic excellence. I never found anything similar with the clojure or elixir communities (which each has its own distinctive style of response to beginner difficulties). My speculation is that Rust has such a strong inclusiveness mandate (which is a good thing in my view), that intrinsic difficulty is threatening to the group's identity. The impulse therefore is to deny the difficulty, from which it's a short step to pointing to the beginner as the source of the problem.
I think this extra effort is experienced differently by different people. But then comes the enlightenment. When you are comfortable thinking of ownership and pleasing the borrow checker without fighting.
And I wonder if sometimes people try to hide how long it took them before enlightenment. Or forgot how much work it was to update ones thinking.
My personal experience with the Rust community has been great. But it was also almost 9y ago. Things may have changed.
That's kind of it. Saying "Rust forces you to think of memory ownership" is more accurate at the beginning, but not so much once you're experienced. Rust doesn't make me think about ownership: that's why the compiler checks it. It points out when I've made a mistake, and I move on. That I don't need to keep the rules in my head is kind of the entire point!
My approach wasn't wrong and it likely would have worked on my first shot in Python or C# or something, but the fact that Rust cares about ownership meant I had to think about it too, even if I only really did that after the compiler pointed out that there were some issues.
I don't believe it's out of a sense that Rust is perfect as it is. There are loads of discussions about where it does a poor job and how it can be improved. The problem is that the feedback from these new users is usually poorly received because the person has an incomplete understanding of the language. They may not understand that there is another, easier and more idiomatic approach to whatever problem they experienced, or they might not understand the values that underpin the language (Bryan Cantrill has a fantastic talk on this [1]). Others being uncompromising in these respects might come across as elitist or condescending.
[1]: https://corecursive.com/024-software-as-a-reflection-of-valu...
But that's not what I mean. I'm referring to the denial in the Rust community that it is difficult, when people are expressing the difficulties they are actually experiencing. The default position amongst Rust enthusiasts is simply to deny that the difficult thing is actually difficult. I have not experienced this anywhere else. You can even see it to some extent in the official tag line "A language empowering everyone to build reliable and efficient software". As this axiomatically applies to 'everyone', it logically follows that if you can't use Rust to build something or you're having difficulties doing so, you are either a bit dumb or lazy.
Now of course, if I really drew this inference merely from a marketing slogan, it would be a cheap shot. But I find it pointedly representative of the Rust culture at large. It is polite, and often fairly helpful, but there is a sort of glassy indifference towards struggle or friction. Asking questions online about Rust often feels to me like talking to a corporate rep.
[PS - thanks for the podcast pointer. Corecursive is in my subs but I haven't listened that far back. I shall]
C, admittedly, doesn't really have that. But I think that's mostly to C's detriment; projects have to sort of fill in those blanks themselves. Largely, I don't think they do: C libraries heavily prefer to return ints for errors, and I don't know that there are really "common" libraries out there? Certainly not to the same degree. (I wonder if the efforts didn't get focused onto higher level languages.)
Today, I'd mostly reach for C++ before C. Relatively¹ safer language, and the STL is far richer, and has basic data-structures that one requires for ordinary tasks. The situation is marginally better, e.g., there's boost, and the STL has seen some growth over time.
The downside, I'd say, is a single implementation and a looser spec, whereas C is standardized and runs on far more platforms.
¹and I mean relatively, as it is pretty trivial to utterly annihilate one's leg with C++
Also, what can you criticise about Rust? /s
That’s why I’m saying that you find those people in most communities. Rust is just the trendy one right now so you just notice it more.
Crude sketches of my experience presenting beginner difficulties to a few communities:
Clojure: "yes, clojure does tend to be used largely by experts, which can present some difficulties", followed by many friendly suggestions about how to get there
Elixir: "you're having trouble? Hmm that's not good. Try this for now, and let's see what we can do to improve matters"
Rust: "no, you're mistaken, nothing in Rust is difficult if you're smart or hard-working enough"
I have not found that. Occasionally, but rudeness, bullying, and intolerance is not tolerated.
Compared to the GNU world. Try reporting a bug in Emacs. "You complete idiot". Or Dog help us: OpenBSD.
I feel the need to mention that that attitude isn't welcome in any of the communities I participate in and I make sure to call it out when it does rear its ugly head. Personally I bend myself backwards to try and meet newcomer developers where they are when it comes to the way the compiler uses diagnostics.
The closest I can think of to this attitude being prevalent is "what are you trying to accomplish (because the way you're trying to do it is going to be harder than you're ready for yet)?", which doesn't mean "you're stupid/not hardworking" but rather "there's collective wisdom about how to work in the confines of the borrow checker, and going against the grain while also learning the language will put you off the language".
Completely agree, but for a different reason:
The community and leadership is overran with woke leftist types. It's insufferable.
Remember if you know better than the borrow checker you can use raw pointers. There is very little friction. But are you sure you can do better without the safety of the borrow checker having your back?
https://play.rust-lang.org/?version=stable&mode=debug&editio...
Rust purposely handicaps ergonomics, even when it wouldn't come at the expense of safety. This is just one example. Rust also doesn't have function overloading, default arguments, named parameters, anonymous structs, unwrap sugar (like !! in kotlin), etc. Rust's aversion to user choice precisely what is hampering its adoption. Docker and kubernetes are written in go. Unreal engine, high frequency trading systems and most of google is written in C++. What significant thing has been written in rust? it's forever going to be a hobbyist language competing on stackoverflow surveys instead of actual large-scale applications. Nobody with any actual money on the line wants to take the hit in productivity to switch to rust, at most it's used for a small part of a larger project written in another language. By the end of the decade there's going to be more things written in carbon than in rust, and that sucks because it was completely preventable.
https://security.googleblog.com/2022/12/memory-safe-language...
https://twitter.com/dwizzzlemsft/status/1578532292662005760?...
https://devclass.com/2022/06/21/rust-applications-previewed-...
https://aws.amazon.com/fargate/
https://github.com/EmbarkStudios/rust-ecosystem
https://research.activision.com/publications/2021/09/the-rus...
Carbon is still an AST interpreter with half baked language design, and it remains to be seen how many of the features are to be designed.
From Carbon, Val, Cpp2, Circle, the last one is the only one that has a chance to actually provide a proper migration path from classical C++.
If I would have to put money in any of those wannabe C++ replacements, Circle would be it.
Can you link some examples?
https://www.reddit.com/r/rust/comments/z3gwag/circumvent_bor...
https://www.reddit.com/r/rust/comments/y20wqd/fighting_the_b...
https://www.reddit.com/r/rust/comments/vyr8im/help_with_maki...
https://www.reddit.com/r/rust/comments/ttzb5w/how_to_deal_wi...
https://www.reddit.com/r/rust/comments/vhcuhe/help_need_help...
https://www.reddit.com/r/rust/comments/ufviu4/question_lifet...
https://www.reddit.com/r/rust/comments/red1f9/borrow_checker...
https://www.reddit.com/r/rust/comments/ozruff/help_with_borr...
You can also try searching "linked list" or "graph". And here are some bigger posts that are genuinely critical, met with the typical rustacean response:
https://www.reddit.com/r/rust/comments/rylrma/im_losing_hope...
https://www.reddit.com/r/rust/comments/xj2a23/my_thoughts_on...
https://www.reddit.com/r/rust/comments/xryi2n/opinion_rust_h...
https://www.reddit.com/r/rust/comments/s75wd9/a_c_perspectiv...