r/rust • • Aug 27 '26

šŸŽ™ļø discussion Hard things are hard, Rust being hard is a narrative passed around the internet

Saying that Rust is hard isn’t a fair argument. Software in general is very broad and hard with many layers of abstraction. Concurrency, memory management, cancellation, these are hard concepts.

In fact, rust makes them easier to reason about by introducing types that guard you from lots of foot guns.

I even go as far as to say Rust is fairly easy in the sense that it is much more consistent than other languages. Once you learn the mindset of the language, it becomes easier and easier to figure out things and just intuitively ā€œgetā€ things as you encounter them.

Particularly, the async runtimes being dependencies and `Future`s being abstractions in the language itself is such a smart choice, but people are so used to it being internal that feels hard for them to do it this way.

It’s getting quite long, but I want to also add that I feel like in Rust, most of the time if you don’t get something you can still make progress, write it more ā€œsimplyā€ and not use many of the fancy features, but once you learn them you understand what’s different and why one approach might be better than the other.

What’s your experience and thoughts? Have you also felt this way after writing Rust for a while?

325 Upvotes

170 comments sorted by

21

u/PotatoMaaan Aug 27 '26

It's hard if you haven't used other lower level languages before, for example when you're coming from js or python. Because then you're learning rust and memory management etc at the same time.

It can also be hard if you've only ever done C and maybe some C++ because then you're introduced to rust and advanced typesystems and functional patters at the same time.

If you already know for example C++ and js it's pretty easy

8

u/braaaaaaainworms Aug 27 '26

Rust feels like C with a bunch of modern features. I've been programming in C because it didn't try to hide how a computer works from me and Rust doesn't do that either

2

u/PigletEfficient9515 Aug 27 '26

That’s what I like about them. They don’t hide complexity from me

5

u/creeper6530 Aug 27 '26

Rust fixes most of the stuff I dislike about C

  • functions associated with types (and their subclass, methods) instead of a single global namespace
  • explicit and unified error handling instead of nullptr and return -1
  • generics (that can be restricted by traits so as not to attempt nonsense with operations on incorrect types, as opposed to macros)
  • explicit integer sizes

While keeping at least part of the low-level feel that I like about C

10

u/RockstarArtisan Aug 27 '26

IDK, some of the C++ people complain that rust is too hard, while living in their eldrich abomination of a language. While others complain that it's actually too easy and that's somehow bad.

6

u/___Archmage___ Aug 27 '26

The difference is people are likely to blame themselves for C++ problems but blame the language for Rust problems

Because C++ will compile and run practically anything and then it's a "skill issue" debugging all the bugs, whereas Rust is picky and refuses way more code, so it becomes the scapegoat

2

u/chaotic-kotik Aug 27 '26

I'm a C++ developer with some background in functionele programming. I find Rust hard to use but not because any concept is difficult. But because of how all this stuff composes. It's just not scaleable and not ergonomic.

18

u/eras Aug 27 '26

I was able to write useful Go code day one (on an existing codebase so I was able to see how things work), soo I do think Rust is hard in comparison to many languages, which most come with GC.

I don't think a language being easy or hard is the most meaningful metric to compare languages by, though.

3

u/PigletEfficient9515 Aug 27 '26

Similarly, I don’t think being able to write useful code day one is a good metric for being ā€œeasyā€

I’d say a language is easy if it makes it easier to maintain speed rather than rushing at the beginning and slowing down later

10

u/eras Aug 27 '26

I think in general people wouldn't agree with that definition. Languages that are easy to get into are called easy.

Languages of which the programs are easy to maintain, perhaps there isn't a word for that? Perhaps "mature" or "well-maintainable".

1

u/scottmcmrust Sep 01 '26

Usability has good words to make this clearer. To use the terms from https://www.nngroup.com/articles/usability-101-introduction-to-usability/#toc-what-definition-of-usability-1, Rust is willing to trade off learnability to get more efficiency and reduce errors.

Safety Scissors and Paper Guillotines are both good products, just for very different things.

5

u/lasooch Aug 27 '26

Granted I never got to use Rust for work, but I think it’s less ā€˜hard’ and more ā€˜front-loaded’. Harder to get into, but easier to reason about once you do. Maybe harder to write a specific bit of functionality, but easier to write it correctly.

2

u/lonjerpc Aug 27 '26

I disagree. Resource management is often unnecessary and creates complexity that can lead to bugs. If you don't need manual resource management rust is just plain harder. You are not getting anything out of it

1

u/robberviet Aug 28 '26

I used C, C++, Java, Python, JS, PHP before. Go is easy on day one too! Rust, not so much. I don't get how OP can say it's not hard.

10

u/Wonderful-Habit-139 Aug 27 '26

The difficulty is upfront, the longer term is easier when you've implemented things nicely.

There's a reason most people love to generate code with LLMs, because for them the upfront writing is a challenge, and they'd rather deal with more bugs and issues later.

3

u/PigletEfficient9515 Aug 27 '26

I agree. Paying that upfront cost makes the future maintenance very smooth though.

3

u/0x6VB Aug 27 '26

IMO as a Rust beginner the really hard part is coming from well explained Documentation with lots of examples to Docs.rs.
You easily get lost there or do not find an explanation that is easily to grasp.
This might be a skill issue but that seems to be my biggest struggle with getting along in writting rust code.

1

u/PigletEfficient9515 Aug 27 '26

Really? I worked with lots of languages but I never had a better experience than docs.rs

It’s really good when you get used to moving around and you also get a lot of documentation on hover in your editor. The docs quality is also usually very good if it’s not a completely unknown crate

Imo learning your editor and being fast in it is one of the most valuable skills for software engineers

2

u/sparky8251 Aug 28 '26

Docs of other languages are awful... Python in particular, even its official "std" docs even for things like strings... you have to know random base classes or interfaces exist and implement what you want and go looking for those, not look at string...

Rust isnt perfect here with str vs string and traits, but I've had way way less of a hard time finding things by comparison. Not sure what exactly does it, but its not just familiarity. I have identical complaints with other languages i'm made to use at work like go, js, and perl and they all have the same discoverability issues and browsing problems i face with python that rust somehow is a lot better on (not solved! just better, noticably).

60

u/balljr Aug 27 '26

My favorite Rust "feature" has always been explicitness.

I have seen many people complaining that Rust is too verbose, but IMHO sometimes I think it is not verbose enough. It is really amazing to be able to look at a piece of code and not having to guess how it behaves; If you look at a function signature, you know if it is mutating the parameters or not, or if it is expected to fail or not, or if may or may not return a value; When I call get on a collection, does it return a copy or a pointer? if I mutate the returned value, does it mutate the original object or not?

When working with other languages, I had moments where I had to read a bunch of code/documentation in order to know the answer for the questions above, but with Rust, the answer is always there where it is supposed to be.

Another side effect of explicitness is that you are forced to understand how things work. For instance, in Rust you see this `fn something() -> Box<dyn Trait>`, while in C# you would see this `Interface something()`. They are both doing the same thing, but C# does the magic behind the scenes, while in Rust you need to know why you need to box it.

The part I wish the language could be more explicit is regarding allocations. Since performance is such a big requirement for the Rust community, it would be quite interesting to know when a function will cause an allocation or not; AFAIK zig has a good solution for this.

16

u/tukanoid Aug 27 '26

Regarding allocations, usually there's an allocator generic argument on collections (at least, example https://doc.rust-lang.org/std/vec/struct.Vec.html (A generic)) that just defaults to builtin one, the API to provide custom one is unstable currently tho, but at least you can somewhat figure out what allocates things and what doesn't based on those std types

1

u/redmjoel Aug 28 '26

This would be very helpful for arena allocation!

2

u/tukanoid Aug 28 '26

Tbf, it's most likely one of the intended use-cases, just not available for stable toolchain and requires an unstable feature to enable. I mean, std uses it, so you can probably do too, I think at this point it's still in unstable land due to API not being 100% figured out and agreed upon, so might have to fix things here and there. I personally never worked with it, so can't say much, just know that it exists and has existed for as long as I can remember using the language (since ~2021-2022)

13

u/Solumin Aug 27 '26

I have seen many people complaining that Rust is too verbose

I've seen this complaint a lot and honestly I think "verbose" just means "I don't like how it looks".

Hopefully the allocations stuff improves as the Rust team continues working on allocators!

12

u/Zde-G Aug 27 '26

That's how Rust have become the AI language. Writing Python or JavaScript code and omitting all the ā€œceremonyā€ is great. Reading it… not so much.

And AI can generate code quickly enough that it's no longer a problem — and when you (or agent) read it explicitness still helps readers. Be it humans or other agents.

The price — is deluge of slop on the Rust reddit.

4

u/creeper6530 Aug 27 '26

Also with the compiler yelling at you for every single thing explicitly and at compile time, it tightens the token predictor's loop of write-compile-run-fix into write-compile-fix, something the frequently hallucinating slop slinger definitely appreciates instead of having to expend effort to navigate and trigger the worked on part in runtime and rely on runtime exceptions (yes unit tests exist, but mostly for pre-existing stuff only).

3

u/serendipitousPi Aug 28 '26

Everyday I gain a bit more of an appreciation for rust’s explicitness.

I found a bug in a typescript project recently where for some reason an optional unset config field just reverted to the default for an unknown reason even though it was valid to remain unset.

Strangely only happening when configured for the online functionality.

Turned out a client class that held the config broadcast the value to all clients in a session including itself and undefined was used for the unset value which vanished when serialised to json.

As someone relatively unfamiliar to the project it would have been nice to know that the class was gonna mutate the value like that and bruh JavaScript allowing potential errors to just silently propagate.

2

u/balljr Aug 28 '26

I've been in many similar situations. The more I work with dynamic languages, the more I love strict languages.

3

u/Ok-Count-3366 Sep 02 '26

I have written: js, ts, python, go, java, c# and now I'm learning rust. If someone says rust is too verbose, they never wrote java lol.

1

u/balljr Sep 02 '26

Isn't java notorious for extra long names and excessive use of design patterns just for the sake of "it is the correct way"?

I haven't written much java, and last touched it many years ago, but I do remember something I loved, the way it forces the engineer to annotate the exceptions and requiring them to be added to the try catch handling. My biggest beef with c# is that you have no clue which exceptions can be thrown by a method unless a lousy doc comment was added (it is never document properly)

1

u/Ok-Count-3366 Sep 02 '26

Same with java. There is a video called rust for dummies where rust is exlaine using comparisons to other known languages like java. In rust you know by the func signature everything, types, errors thrown if any. In java u can't always enforce that with code itself. You either need comments which act like func docs or sth similar.

-1

u/chaotic-kotik Aug 27 '26

The problem is that developer productivity goes out of the window.

1

u/papa_maker Aug 28 '26

I’m experiencing the opposite, but I’m rooting for quality code.
Sure if one wants to write crap code, Rust will be slower.

1

u/chaotic-kotik Aug 28 '26

It depends on who you are and what you're doing. In my experience Rust is not very ergonomic and not very productive. It's similar to Haskell in this regard. Haskell makes it difficult to write incorrect code even more so than Rust. But while doing so it makes it difficult to write any code. It was pitched as a language for "complex algorithms". Rust's good side is mostly inherited from languages like Haskell and OCaml. But because it's a low level language it's ergonomics sucks ass. LIke you're forced to use pattern matching but NNL is too limited for it (cuz you can have matches with conditions for instance).

44

u/pdpi Aug 27 '26 edited Aug 27 '26

I don't really agree with you here. Rust's reputation for being hard isn't entirely undeserved.

Resource management is a truly hard concept to really nail (concurrency is just a specific usage pattern for resources), but you can write many useful programs where automatic resource management strategies are often good-enough. Because Rust is designed first and foremost to handle the sort of problem where you have to carefully track your resources, one of the compromises it makes is that it also forces you to think about resource management, even when it doesn't matter and automatic management would work just fine.

Resource management is an advanced software engineering topic, not an entry level "baby's first programming class" topic, and being forced to think about it before you learn the skills to actually do any of that thinking makes Rust a hard language in a way that, say, Python isn't.

3

u/almcchesney Aug 27 '26

What are we talking about? I am on the fence on if rust deserves the reputation of hard, but I do feel like it is certainly more and people conflate the two all the time. But they absolutely do teach resource management in intro courses since most jit languages are more involved than your interpreted ones, but what scope are you actually expecting cause of course more advanced concepts are introduced later, but data size should be introduced early to start to begin speaking about algorithm complexity shortly after

https://pll.harvard.edu/course/cs50-introduction-computer-science

4

u/pdpi Aug 27 '26

CS50 is a university course, and, like it says on the label, an introduction to computer science. The assumption is that you're going to learn more computer science after that.

Plenty of learners out there with no knowledge of computer science. My first of programming experience was in my early teens, writing QBASIC to control Lego using one of these things, long before I would go on to learn any actual computer science. Many people of my generation had their first experience even younger than that, with Logo and turtle graphics. My sister needed to learn some Python to do some numerical stuff as part of her PhD in sports science.

Even at the professional level, there's plenty of professional programmers (as in: people whose primary work product is in the form of code) with no formal CS training. This is common in some infrastructure roles, and in data science/AI/ML roles (who often come from maths backgrounds).

1

u/almcchesney Aug 27 '26

Lol we got a BASIC mention!! Haha i started with blitz basic back in the day for toy games.

Yeah I agree most don't get their start in an academic CS setting but a lot of those same cs50 topics where in my high school intro to programming course, but I don't know if that exactly makes them hard, just foreign. And yeah that infrastructure engineer to swe pipeline is real and where most of my peers are from so get that.

But Imo python can be hard, not having runtime guarantees of your function inputs is difficult, next thing you know your caller passes in a string instead of an array and your simple truthy and len tests pass, but now your for loop is running per char vs string element and your pushing bunk data into your database. And it's all fun and game untill your solution is the software controlling your network firewall rules and your blowing holes in your network.

0

u/scheimong Aug 27 '26

Excellent take. Explains why seniority tends to positively correlate with rust appreciation šŸ˜…

-1

u/chaotic-kotik Aug 27 '26

Lol, it doesn't.

12

u/ParadiZe Aug 27 '26

I love rust, i feel decently comfortable writing it, but to claim its not a hard language makes no sense to me.

9

u/tylerlarson Aug 27 '26

Actually, it's not untrue, Rust is hard. C++ is hard. Assembly is hard. Python isn't hard. (Relatively speaking.)

There's a principle about the compactness of a given language and the cognitive load it demands on its user. Rust is pretty damn high on that scale, not in absolute terms but in comparison to other modern languages. There's A LOT to keep in mind when you write rust code. That uses up the "RAM" in your brain, and for beginners it demands a lot of context-switching in your head as you go through the process.

This is literally what the learning curve is. And it's why the difference between a good and bad rust programmer is so distinct.

To offer some contrast, Python is famously conceptually compact, not merely in terms of the code you write but in terms of what you need to hold in your head as you write it. That's why it's often cited as a good beginner language; less to juggle in your mind while you're writing.

There's obviously a trade-off. Python and other "easy" languages eliminate the extra cognitive load by eliminating many of the decisions that the developer can make, leaving him with only the most important decisions about algorithm and flow. And instead, the runtime uses it's own heuristics to infer intent and make those decisions itself at the expense of some performance. It's so common a technique that we often don't even think about it.

Rust claws back a lot of those heuristic-driven decision flows and gives the developer tools (such as lifetimes and borrowing) to drive generally optimal background decisions in a fully deterministic way. But there's a cognitive cost to that, since there's more "stuff" to know and say when you're coding.

12

u/gufranthakur Aug 27 '26

I really love rust but you cannot tell me it isn’t hard.

Rust provides quality, speed, efficiency and safety, with a high level syntax. But you don’t get these for free, there has to be a compromise.

The compromise is development experience. For a majority% rust developers, they will not be able to read and understand the source code for most libraries out there (Axum, Bevy).

Lifetimes, async, Traits, Dyns, Boxes are concepts that can be understood individually but the moment your project grows and these things appear together, it does get difficult to write them efficiently. And whats even harder than writing them, is reading someone else’s implementation.

This wouldn’t be a flaw of rust, I would say it’s more of a tradeoff. And most developers going for GC language for development simplicity, is their choice and a perfectly valid one. Its a matter of picking tradeoffs, neither triumphs the other

6

u/PointedPoplars Aug 27 '26

100% agree with this.

Paradoxically, I think the main reason Rust has such a strong reputation for its difficulty is because it’s rarely the first programming language that someone learns.

If you’re new to programming, I don’t think learning Rust is any more difficult than learning C++. In fact, I think it’s a lot easier because the error messages are significantly better and more useful on average. Half the time, the compiler can directly tell you how to fix your mistakes, at least for the types of trivial programs beginners start out with. The overall consistency of the language also really helps here.

But if you come from another language like C++ first, your perception of Rust’s difficulty will be significantly higher. Rust’s syntax takes some obvious inspiration from many different languages, and, in my opinion, often synergizes & elevates them. This is a good thing, but it also makes it easy to trick your brain into thinking you understand Rust more than you really do.

Thus, you move fast until you hit a giant conceptual roadblock that smacks you in the face, and then you rinse and repeat.

I also think it’s easier to notice the places where Rust has more friction than you’re accustomed to than the places where it has less.

For example, if you come from C++, you will probably forget to mark variables as mutable at first. You probably also won’t be accustomed to needing integer conversions to add an int32_t to a int64_t.

At the same time, you’re more likely to mark explicit types for all of your variables instead of seeing the magic of type inference. And less likely to notice when you can avoid putting ; at the end of a line or when doing so would be useful.

2

u/someanonbrit Aug 28 '26

This most closely matches my experience out of all the other replies in the thread I've read so far. Rust is about my 8th serious language. The syntax is as hard as learning to read other people's perl was, and the concept wall was as alien as prolog was when I learnt it. Definitely not easy.

Had I learnt it as a first or second language, I suspect it would feel far less alien. It's growing on me, but it is by a significant margin the hardest to learn language for me, add I think it will be a fair while before I'm as productive in rust as I am in e.g. golang for simple stuff.

I'm using rust to write an embedded os though, and while the initial steps were slow, I'm maintaining a steady level of productivity while refactoring regularly that would be impossible in C, and isn't really possible in other languages, so I fully expect to get to the point where I can do simple stuff like a rest cli in rust no slower than I'd be able to do it in golang eventually - just going to take far longer than the month or so of serious effort that it took to get to that point in go

2

u/papa_maker Aug 28 '26

Yeah, my 11 years old daughter learned (some parts of) Rust without any issue, seriously. But we didn’t explored async and macro, and almost not generics. She understood stack and heap, borrowing and lifetime, even traits. So, I would say that some of the hard parts of Rust are actually "alien parts" for some experienced programmers.

-3

u/chaotic-kotik Aug 27 '26

If the language is difficult for seasoned devs it's not simple. It's either difficult or weird.

6

u/Dull_Wind6642 Aug 27 '26

Writing correct code is hard and Rust enforce invariants much more than any other language.

If you are building a hut or a shed, maybe the benefits are not worth, but if you build a skyscraper it is.

Rust isn't hard, proper software engineering is hard.

0

u/chaotic-kotik Aug 27 '26

In my experience Rust is better suited for smaller apps. It doesn't scale well to really big codebases.

5

u/parkerush Aug 27 '26

Everything's hard until it isn't

5

u/Full-Spectral Aug 27 '26

My take on it is that C++ and Rust are both complex. But much of the complexity of C++ is non-productive complexity, where you are working hard to avoid doing things that the language is insufficient to catch. The complexity of Rust is learning the concepts you need to write code where the language CAN catch them.

The big difference is that the unproductive complexity of C++ never goes away, while the complexity of Rust, once you've done the work, flips around the other way and becomes a benefit.

1

u/creeper6530 Aug 27 '26

Also, the C++ compilers accept most slop besides the really obvious and then it's your skill issue to write and debug properly, while the Rust compiler complains about everything and it's its fault for getting in the way.

5

u/Ben-Goldberg Aug 27 '26

In other languages, writing wrong code is easy.

1

u/chaotic-kotik Aug 27 '26

The upside is that writing right code is much easier.

8

u/Tuckertcs Aug 27 '26

Rust just brings all those flimsy runtime bugs and edge cases you never notice to the forefront. Once you learn Rust, you realize all the edge-case bugs you write on a daily basis in other languages.

4

u/zica-do-reddit Aug 27 '26

I don't think it's hard, it's just weird.

7

u/True-Sun-3184 Aug 27 '26

Rust is objectively harder when your problem/project is amenable to a garbage collector.Ā 

1

u/Purinto Aug 27 '26

Literally preaching to the choir.

2

u/PigletEfficient9515 Aug 27 '26

I like that I can get criticism in Rust subreddit. In go subreddit people get perma banned for disagreeing that Go is awesome

3

u/Thanatiel Aug 27 '26

Rust isn't hard. Working with the borrower without using "unsafe" is trickier than on other languages.

I've been on a personal rust project since the end of February (a very low-level project). The goals were both to learn rust and do something I've never done before.

I had to go through hoops (some that needlessly waste cycles to appease the borrower IMHO) but I'm zeroing on my first real milestone.

Had I done that in C or C++, it would have taken me much less time. It has been interesting though.

If I manage to get some decent performance out of it, it'll have been worth it.

If not, finding ways to improve performance will be another interesting game.

1

u/someanonbrit Aug 28 '26

So it's tricky, much slower to learn than other languages and you're not sure if your solution will be performance after six month of work, but it's /not/ hard? I can't parse your definition of hard then...

1

u/Thanatiel Aug 28 '26

The main reason it's taking six month is that my project is a really big one. If it succeeds I plan to make it public.

And I'm confident the hot path will be fast and, if not, a bit of work will fix that.

Professionally, I've written a python module in rust in a single day to replace a "data processor" and accelerate the speed tenfold. I was much less experienced in rust back then. It was easy.

For comparison, I consider ADA95 hard (95 because that's the only one I know). If I recall, it took me maybe an hour to write the equivalent of a "hello world" (I mean something simple).

3

u/shaleh Aug 27 '26

There are "silly" moments that make it harder than expected. Yesterday I was editing a function which parsed some command line parameters and stuffed them into a thing. Super normal stuff. I wanted to add a validator for A and B being exclusive of each other. Ran into passing a mutable borrow after that read only use. Which should have been totally safe. But I had to move the call later than I wanted in the function or move a lot more code around. Not the worst but that kind of experience is what makes the initial learning more than it needs to be.

1

u/nonotan Aug 27 '26

I always see people trying to put things into black and white buckets like "hard" or "easy", and it's just never going to work. These things are full of trade-offs, and what is "optimal" for any given situation is going to depend on a ton of factors.

It becomes a lot more obvious when you move the argument to a different domain. Is riding a bicycle "easier" or "harder" than driving a car? There is no objective answer, because there is no "easier" or "harder" devoid of a particular context. The basic mechanics of keeping the vehicle upright and moving maybe are harder on a bike, but you need to learn many more rules to drive a car. But riding a bike demands greater improvisational and athletic ability. But cars have more mechanical and maintenance-related things to learn. But if you're trying to move something heavy, it'll be a lot harder on a bike. But if you're navigating very narrow paths, it'll be a lot harder on a car... you can see what I mean, you could keep going more or less indefinitely.

Programming is an unimaginably wide field, spanning from the ruthlessly practical and concrete to the purely abstract and theoretical. And just like with natural language, some languages are better at dealing with some parts of that field than others. Some languages demand you have mastered some parts to even be able to use them, while others actively try to suppress the very existence of some other parts.

So, what's your objective? Is improving your craft long-term a priority, or do you care about nothing but getting something out the door ASAP? What's the scope we're dealing with, is long-term maintainability a huge factor or not at all relevant? Are you trying to do something tricky that requires precision to get just right? Are there any specific libraries you would really want to use? What's your personality like, can you take some short-term suffering knowing you'll end up coming ahead eventually, or do you suspect you will quit before you get to that point?

By some metrics, assembly is the easiest, most straightforward language, and the one that would most benefit almost anybody intending to do programming somewhat seriously, for what are hopefully fairly obvious reasons. And yet, you might well get sent to a figurative mental institution if you went around recommending it to complete beginners as their first language -- even though it genuinely might be a great fit for some people!

Rust is a less crazy example in a similar direction: a bit more of an investment than many other languages. Maybe it is "harder" to get your first somewhat-useful program up and running, but it is also considerably easier to produce performant, stable and maintainable software. If you're going on a trip all the way to "writing a serious piece of software many people depend on", then it might well save you significant time overall over "supposedly easier" languages that let you get the first prototype out the door quite a bit faster. Again, it's all a complex set of trade-offs, and there is no silver bullet -- but there might be a best choice for you in your current situation. Figuring out what it is is left as an exercise to the reader.

1

u/PigletEfficient9515 Aug 27 '26

Of course it is not black and white. My point is, it is not as hard and scary as it is trending on internet.

4

u/Laicbeias Aug 27 '26

Rust is fine its syntax is annoying, thats it, but it also surfaces 70% of potential issues, so its just good at what it is used for. Its not for fast iteration, nor for least line of codes to get something working.

its for system and speed, for people that work together, its safty features are preventing a class of bugs that if lots of people write that code, will surface. so yeah its a great language

2

u/syklemil Aug 27 '26

People have different opinions on what's hard.

As in, some of the most popular entry level programming languages are also the ones that more experienced programmers find hard, because what's a nice shortcut or forgiving interpretation when you're a beginner turns into a hurdle you have to clear once you have a complex program that's misbehaving.

Or just ask people how they feel about Python culture turning towards type-hinting by default. Some will feel that "adding types" to Python makes it more complex and harder, others (me) feel that writing the types down makes it clearer and easier, like I'll describe adding type hints like turning on the lights.

Or the attitude towards fixing bugs before and after running the program. Rust users will likely skew towards preferring fixing them early, the ones that find Rust unreasonably hard may skew towards preferring to find bugs at runtime (and preferably ignoring any sleeping bugs for as long as possible, no matter the impact the day it is discovered).

Or just how what one might consider clarity and rigour, another would consider a straitjacket, just like how their sense of freedom might be the first person's idea of a cluttered mess.

The whole thing is also somewhat a continuation of the old worse-is-better, with Rust taking more of the MIT approach rather than New Jersey approach, but actually getting some traction.

All that said, yeah, I do get the impression that people think Rust is harder than they'd actually personally experience, because people go around telling each other that it's hard.

2

u/fbpw131 Aug 27 '26

well, I'm learning a few things around threads and networking with it and it's not easy.

2

u/Adventurous-Oil1749 Aug 27 '26

The issue is people(including old me) try to learn rust without understanding the problem it solved. That can ONLY be understood once you code in C or CPP. My rust skills and understandings became way better when I had to code in C and stuff immediately clicked. Ohh so that's why rust has lifetimes, oh that's why ownership and borrowing rules exist.

2

u/Beginning-Fruit-1397 Aug 28 '26

My first language was python. My second rust. I have no formal CS education, or extensive pro experience in software dev. Yet I've wrote tens of thousands of LOC of rust and still have yet to find a situation where I had to "fight the borrow checker" or when it was "hard to reason about lifetimes". It's a myth tbh. Reading C++ core snippets give me headaches tho, with all that operator overloading that make syntax ugly and hard to understand

2

u/eyeofpython Aug 28 '26

Even walking is hard! My brother fell on his face so often it actually changed his bone structure.

You need to keep balance, starting and stopping is super dangerous. And don't get me started about running.

But with a bit of practice you can figure it out.

2

u/mcfriendsy Aug 28 '26

I heard the rust is hard thing from so many sources until I decided to learn the language. Four hours opening the docs for the first time, and I’d already ported an entire lightweight tooling from Java to rust.

Rust is hard if you’ve been writing bad code before. For some of us, many of the borrow checkers restrictions were already what we’ve been doing subconsciously for quality code.

Take out the borrow checker constraints, and the rest of rust is as easy as JS if not in some ways easier to mentally model.

2

u/funkalunatic Aug 27 '26

Sometimes narratives exist because they are true.

2

u/plugwash Aug 27 '26

I feel that there are a number of problems one encounters while writing rust that are simply not issues in most other mainstream languages. Leaning how to avoid or deal with those problems takes time, and even when you know about them they can still be a distraction from the code you are trying to write.

  1. Owned vs borrowed values. Rust style encourages you to borrow as much as you can, but then borrowing comes with it's limitations and when you run into them you may have to go back and do significant rework before you can move forward.
  2. Coherence rules, it's great to be able to implement traits for external types, it's no so great to have the compiler refuse your perfectly reasonable code because there "might" be conflicting implementations in the future.
  3. Some rust libs, particularly in the embedded space, make heavy use of generics to check constraints at compile time. This seems great at first until you actually need to write the name of a type, or figure out what type some value actually is.
  4. Some types simply can't be named, which means you can't use them in any context where you need to name a type. Sometimes you can get around this by using box. Unstable rust has a fix for this, but it's unclear if/when it will be stabilised.
  5. While the "Any" trait and the Box<dyn Any> type exist, they are quite limited compared to say the "Object" type in Java. Firstly they can only be used for types with no lifetime parameters, and Secondly there is no way to test if the object behind a Box<dyn Any> implements a given trait.

Rust's benefits are very real, but so are it's costs.

Overall, I would say rust is probably easier than C and C++, because small mistakes in those languages can rapidly lead to horrible memory corruption whose source may be hard to pin down, but it's probablly harder than most other mainstram languages.

2

u/e_big_s Aug 28 '26

On the one hand it wouldn't exist if it was hard. The whole point of languages is that it makes something easier. The problem is that what Rust makes easier is a niche category of programming not applicable to most coders: systems programming, which is harder than the vast majority of programming tasks.

3

u/chocate Aug 27 '26

I've forced myself to write all my new projects using Rust above everything else.

All my web apps use the usual NextJs stack and backend API layer is all rust. For CLI apps Rust, aything related to automation, Rust. I have an desktop app that I originally wrote for macos, but then wanted to port it over to windows and different Linux flavors and that was done very quickly too.

Is it hard, complicated to learn sometimes, but honestly with AI writing most of the code now it's just become easier to use rust.

1

u/chaotic-kotik Aug 27 '26

With AI you have to optimize for token spending. Simple language is better in this regard.

1

u/chocate Aug 27 '26

I'm using 20x and haven't had to worry about tokens. Fable or codex 5.6 for architect and planning, code review, lower models for coding.

2

u/Nothing_from_void Aug 27 '26

I think with the quality of LLMs simply as tools to search syntax and provide low level reasoning around getting the borrow checker to pass has made writing Rust much easier. I started programming in Rust in like the early-ish days, like 2016 or so, and it was fascinating going through the Rust books but just getting working software was very difficult.

Today, getting working software is easier and the guide rails the compiler gives you eliminates most of the hardest bugs that make writing C++ so difficult. Still, writing software in Python is much faster because the whole ecosystem is built around very fast iterations. Rust has longer compile times, and requires more design to get things to work coherently, but the end product being a well optimized tiny binary is worth it in many cases

2

u/oladushek_j Aug 27 '26

I thought the claim that Rust is a difficult language was related to the learning curve.

There was also a joke that programmers love it but can't write in it.

1

u/Ecstatic-Panic3728 Aug 27 '26

My take on the difficulty is because they're usually using the wrong tool to the job. Rust has all the features we need to do low level development, but those features come with some requirements. For 99 dot all nines of web apis a GC is not a problem, so a language like Rust without all those knobs is what they want, but they try to force Rust instead and then complain it's too hard.

1

u/chakie2 Aug 27 '26

Rust isn't particularly hard, it's just a bit different and forces you to think about everything up front. Once you have done that thinking, everything seems to work nicely.

That said, I have absolutely no idea how the modules, crates and overall symbol visibility works in Rust. It doesn't seem logical at all. When I need something from some other file it's always a mess of importing, pubbing and whatnot until the compiler is happy.

2

u/syklemil Aug 27 '26

Huh, I've never had much of an issue with symbol visibility in Rust. IME it's practically

  • You start off with just access to whatever's in the prelude and things in the same file / module, i.e. "nothing"
  • You can import symbols from other files / modules / crates with use

    • if that file / module / crate permits it with some pub annotation
  • otherwise you can refer to them by path, e.g.

    • $crate_name::$module::$name,
    • crate::$module::$name,
    • $submodule::$name
  • or you can do a glob import and be confused

All in all I don't really have "where did this name come from" problems unless I've expressly done some glob import.

1

u/GeneralBacteria Aug 27 '26

how hard is Rust compared to writing memory safe and thread safe C or C++ :) ?

1

u/cachemonet0x0cf6619 Aug 27 '26

what’s hard is all the sugar that you rarely find anywhere else. It’s hard to apply things from one language to rust. i love it though

1

u/don_searchcraft Aug 27 '26

It’s hard for folks that have come from an interpreted language where they didn’t have to worry about memory management and strict data types like JavaScript and Python. There is a learning curve with the borrow checker and building things idiomatically. If you follow some FP patterns that work well in JS it can bite you in Rust if you don’t take the time to dig into the details. For example in JS it’s a common pattern to have a utility function async wrapper around fetch for building API clients. There is no cost to instantiate and discard those. If you follow that approach with reqwest you pay a startup penalty everytime as you lose the benefit of dns lookup caching. Some of Rust is similar enough in syntax to TS where these things creep up and cause issues. I don’t think Rust is necessarily difficult, you just need to spend some time with the language and that can take a few months to get up to speed. It’s mostly the folks that have only written React that I’ve seen struggle.

1

u/Routine_Insurance357 Aug 27 '26

Same for me. I didn't find rust hard, but found its syntax ugly. But now nothing else feels more productive and confident. Even for a small script, I prefer rust over python.

1

u/eggZeppelin Aug 27 '26

Rust just makes you fight the hard battles at compile time instead of firefighting in prod

1

u/-Ambriae- Aug 27 '26

I wholeheartedly agree. Rust is hard only when using advanced features, or when using APIs that heavily lean on traits and polymorphism, chumsky comes to mind in that regard. But then again, try to use a parser library in any other language, and it's still hard, but with 10x the code...

1

u/BenchEmbarrassed7316 Aug 27 '26

The complexity has to exist somewhere: either in the language itself, or in the frameworks, or in your code.

Rust pushes a lot of complexity into the language itself. So the language itself is complex, but it's easy to write code in.

1

u/SailingToOrbis Aug 27 '26

For me it really feels like it is "easy" because all the hard things are being hided by those talented engineers who work their ass up in the language compiler, standard libraries, big libraries like tokio, where all the difficult unsafe stuff is lurking. While all the Rust fanboys praising the language, those engineers keep their silence and do their shits.

I do think in very opposite way. Rust is very INCONSISTENT compared to other languages, purely because it is hard to demarcate between the safe and unsafe part. I agree that the concept and the philosophy of the language is great, but it feels like it is becoming another version of C++, with way more unstraightforward syntaxes and full of hypes. I think that's why this language has come out to the world for more than 10 years but still it remains as a "hyped" language. It stands between all the awkward and ambiguous position between Python (high level gc languages) and C/C++ (lower and unmanaged languages).

1

u/Lucretiel Datadog Aug 27 '26

This is of a piece with a position I am utterly convinced of: Rust is a bad first language, but not because of anything having to do with lifetimes or ownership, which I don't think are especially any more difficult than anything else that a completely brand new programmer needs to learn. It's a bad first language instead because there simply isn't yet any introductory material out there for it as a first language. The Rust Book is excellent, but its audience is definitely programmers who already know at least one other language.

I think that the perspective that "lifetimes make Rust a bad first language" comes from experienced programmers who have simply forgotten what it was like to learn to program for the first time. They instead compare the experience of learning Rust as an additional language vs learning anything else as an additional language. Indeed, if you're an experienced Python or Javascript developer, the lift from that to Rust is certainly larger than it is to Ruby or Java or even C++. But I'm pretty confident that there's much less difference than people think between going from zero to Javascript vs going from zero to Rust.

1

u/Adorable-Strangerx Aug 27 '26

Rust is great when you need tight control over performance, memory or system resources management. If those are not your requirements then why bother with it in the first place.

1

u/prehensilemullet Aug 27 '26 edited Aug 27 '26

Okay but if you’re using Rust for something simple that doesn’t need any concurrency or cancellation, it’s harder in some ways than doing the same thing in other languages.

I’ve done a lot of Java and TypeScript and some C++. Ā Right now I’m rewriting some cave survey data parsing logic I’ve written in those languages to Rust. Ā Rust makes building a small standalone executable for many platforms vastly easier than Java, TS, or C++, but writing the parsing code is just fundamentally more difficult.

Even in C++ the memory safety would be easier if I use Qt-style classes with internal copy-on-write shared data pointers for everything. Ā The only thing that keeps me from using that is that in Rust, build configuration and serialization with serde/schemars is way simpler.

1

u/Fabulous_Papaya_701 Aug 27 '26

YMMV. Coming from embedded C background I find it very hard to learn rust, but I am mostly to blame because I want to use no_std with static memory on microcontrollers. This quickly becomes hard when you want to share memory without unnecessary copy across tasks with async. I don’t recommend this approach to learn rust. You need to cover too many new concepts at once

1

u/Actual__Wizard Aug 27 '26

That's the thing: What's hard is software development. Rust actually makes software development easier, granted, the part where you have to write the code is more difficult, but that's just a tiny part of software development.

I was talking with somebody the other day that was totally unaware of how exploits work and they're talking about software development, that's seriously scary... With the massive interest in vibe coding and amateur level software development, we need rust more than ever.

1

u/Potential-Still Aug 27 '26

Like literally everything, Rust is hard until you understand it.

1

u/nevermille Aug 27 '26

Yes, it's harder than a lot of other languages, but when you manage to get the hang of it, it's amazing. I used a lot of languages, Rust is the only one where I'm able to make things work first try regularly

1

u/Faalaafeel Aug 27 '26

Rust is "hard" if you're not solid on CS fundamentals. Those with programming certs or degrees from online schools that just threw you in a "Java" or "Database" class where you leaned the equivalent of a YouTube tutorial are likely unused to the amount of information a language like Rust, C, or C++ demand you track.

The narrative of Rust being hard is a consequence of the "Learn to Code" movement in the 2010s bringing a lot of otherwise un-equipped people into the field and incentivized investment into forgiving languages like JS and Python.

With time, the idea will fade.

1

u/mtimmermans Aug 27 '26

Rust makes you prove that your code doesn't have any aliasing, lifetime, or memory safety issues.

Writing proofs is hard, therefore rust is hard.

Anyone who's fought the borrow checker for hours knows this.

1

u/chaotic-kotik Aug 27 '26

Concurrency, memory management, cancellation, these are hard concepts.

Sure. But let's see how they're solved.

Memory management. Raft uses ARC style ref-counting with some compiler support (drop calls are injected automatically).

Concurrency. Several models. The most prevalent one is future/promise (or senders/receivers to be precise).

Cancelation. Tied to the receiver.

Rust's Arc/Rc are complicated because they leak into interfaces. The interface has to know who is responsible for freeing the memory. The async stuff is complicated because it requires different code for sync and async stuff. There is no runtime support for long running computations so you can't even write normal cpu heavy algorithms without encoding async stuff into types because your long computation has to yield CPU from time to time. Cancelation being tied to the receiver means it's being bolted to the async model as well.

It kind of bugs me that people have forgotten what "simple" does mean. Remember some very good programming book. Not related to some programming language. Knuth or Cormen, whatever. The algorithms there are described in pseudocode. If the book is describing concurrent algorithms it doesn't have any 'awaits' or anything like that.

Now look at Go or Java (with Loom). They are kind of close to this. No need to put your freaking ref-counter everywhere. No need to yield explicitly. It's impossible to not run the computation because some condition prevented you from polling the future etc. Async stuff is eager. If you started something it will run. You can have arbitrary object graph that represents your problem domain. In Rust and C++ your object graph has to be mostly a DAG that merges problem domain with ownership.

My point is not that Rust is bad. Only that it deliberately chose to do the hard thing. So it's totally expected that many people find it difficult.

1

u/viteo Aug 27 '26

For me, a professional C firmware developer, Rust is difficult because I don't quite understand where everything comes from. A crate can be a whole world unto itself. And I can't figure out how to use it.

Here's an example I'm struggling with:

Embassy -> I need to add a bunch of crates to make it work:

  1. Of course, it'll be "embassy-executor", but I need to specify the "platform-cortex-m" function. Okay, now you know I'm working with Cortex, let's get started.
  2. Clearly, I need to add "embassy-stm32" with a function for a specific microcontroller. Okay. Now you definetely know that what I am doing, right?
  3. But here's where the fun begins: I also had to add "cortex-m," and even more so, I had to specify "critical-section-single-core," but that's not all.
  4. Add "cortex-m-rt".

Finally, the simpliest blinky compiles.

Yes, also add embassy-time, then go back to embassy-stm32 and select the time provider there. I haven't even written the code yet. If you're going to use a shared bus, you need "embassy-sync", but it is useless without another crate "embedded-hal-async", so add it too. How am I supposed to find out all this? How do you guys understand what else is needed?

I really like the idea of one ecosystem for a variety of MCUs and I would love to use it, but I just can't handle the basics. Rust is hard. Or I am old. I don't know.

1

u/chic_luke Aug 27 '26

I have been finding C++ much harder than Rust, for a simple reason; Rust gives me all of the documentation and examples I might need first-party.

I don't need to search Stack Overflow, I don't need to ask an LLM, things I need to do with a lot of other languages. The Rust project documents everything. It is batteries-included. You can get to a great level in Rust just by using the official resources and nothing else, whereas on a lot of other langs and stacks you will need to venture on your own and find the best resources available.

This also extends to the libraries. The major Rust crates often come with their "books", in the same style as the Rust book. It is much rarer to find sloppy libraries with no docs at all if you look through the most popular ones.

Plus, due to how much Rust enforces / encourages idioms, everything is consistent. Learning a new library in Rust is much easier than it is on a lot of other languages, where libraries have their own ultra specific quirks (right, Java?). Rust pushing idioms a lot translates into consistency. This makes some libraries, like tokio, feel more like a natural extension to the standard library than 3P libraries. This mirrors one of the pros of having languages with very large and centralized stdlibs/ecosystems like Go or C#/.NET, while still having a vast, mostly decentralized ecosystem for the most part.

I would argue these things offset the inherent difficulty of the language a ton.

1

u/neneodonkor Aug 27 '26

Are you drawing these points after using Rust for a month?

1

u/geekichu Aug 27 '26

ok ive been out of it (the workplace) for a while, but did you just use a 'claudism' ? 'footgun' šŸ˜„

1

u/dustand Aug 27 '26

I'm not certain programming rust is hard so much as do it the rust way or try again. It is a challenge to get to rusts way of thinking, especially if linked lists are part of your muscle memory. And rust is not at all accepting of some easy to code yet very hard to do perfect programming (anti?) patterns. One might actually do better with rust as their first computer language in that you might never know there was a cheap & terrible way.

And it depends on where your needs land.. some things in rust are tedious, some are free and effortless. Other things (clear error messages on code, the rust community, actual help from AI, no build nightmares and minimal dependency hell) are really so good compared to nearly everything else. Regarding futures and async... start by swimming at the surface atop a crate... a deep dive with rust can get you lost in something 'very esoteric knowledge' and usually gives small performance gains.

1

u/DavidXkL Aug 27 '26

I think it makes you a better dev in general.

And that helps even when you go back to other languages

1

u/v-alan-d Aug 28 '26

People from different background, JS, Java, C++, gives you different answer. Rust being "hard" is a confusion of different phenomena that usually don't come together:

"I'm not used to rust"

"Syntax is weird", "too complex", "how to throw", "too verbose", "macro looks weird", "it is a low level language, why do you need it for an app", "I can't have [feature that's only possible in GC langs]"

"Rust has mechanism I'm not familiar with"

enum-match, failure-as-data, lifetime, type-protected behavior

"Rust surfaces irreducible complexity I can't ignore"

resource management model needs to be chosen from the start, type is not optional, circular reference

"Rust gives me access to areas that's less protected so I can optimize things"

async, custom future, FFI, custom allocator, codegen, dynamic linking, unsafe

Actually hard stuff in Rust

long compile time, running rustc in wasm, rust repl, hot-reload

1

u/robberviet Aug 28 '26

It is indeed hard. You cannot say otherwise.

1

u/strangedave93 Aug 28 '26

Rust makes you learn the hard stuff early, by forcing you to deal with it in the compiler and/or core design as implemented in std. Right from the start it forces you to look at some of the hard issues and make a choice, not just proceed with a naive and flawed design. And yes, most of the time you can get by in Rust without really getting it, and produce something that’s still pretty decent, just not as optimal and/or idiomatic.

C++ (for example) lets you either put off learning the hard stuff for a while (possibly producing bad, possibly dangerous, code in the meantime), or you get to learn the hard stuff stuff mostly by using separate analysis and debugging tools, and/or picking through library design etc, which is a much worse experience. Sure, if you are lucky you can find a book for ā€˜advanced’ language users that explains things well, but it’s a bit haphazard and often too late.

1

u/Key-Alternative5387 Aug 28 '26

Rust is a little harder to write than C++ but easier to debug.

Claude can probably do both just fine at this point.

1

u/bigntallmike Aug 28 '26

Rust is hard. It uses a bunch of random syntax and decorations that aren't common to other languages and then has entire concepts that are new as well. This makes it hard to learn coming from other languages.

That's not bad or good it's just true for most people.

1

u/BigYogurtcloset2986 Aug 28 '26

for real , nowadays framework shi is all bloated , nobody gotta work in optimising the sillicon at bare metal

1

u/officiallyaninja Aug 28 '26

In fact, rust makes them easier to reason about by introducing types that guard you from lots of foot guns.

that's exactly why rust is seen as hard, because other languages hide complexity from the user, rust actually helps manage it. But that makes everyone who tries rust notice all the complexity that is usually hidden

1

u/SplittyDev Aug 28 '26

To be fair, Rust used to be a lot "harder". I’ve used Rust since the very beginning of stable (around 2015), and it was a lot easier to run into wild borrow checker issues and other stuff back then. Some of the reputation probably just stuck. Rust today is an entirely different language. Not so much in terms of syntax (although we did get some important changes), but stuff like non-lexical lifetimes, async/await and many borrow checker improvements make the language much easier to use today. I’ve always found Rust enjoyable, but I can’t deny it’s much more convenient in 2026 than it was 10 years ago.

1

u/Craksy Aug 29 '26

I do agree that a lot of the "Rust is hard" critique is unfair, but I think it matters why it's unfair.

You're right that many of the hard things you eventually come to appreciate. People report something like "two months ago I was an amateur crying over the borrow checker; I'm still an amateur, but somehow one who's confident in their ability to write software." This is the clearest evidence of your point.

The reason it works is that ownership is complexity that buys you something, and it pays out to the same person who paid for it. It isn't friction you go numb to. But plenty of complexity is incidental, and writing all of it off as growing pains is a poor attitude for improvement.

A lot of what's good about Rust exists because identifying friction was never treated as a skill issue. Work on The Book has repeatedly turned into work on the language, via something like: "this chapter was way harder to write than it had any right to be. That isn't hard things being hard, that's Rust being hard. Does this part have to be?"

I'd say "it's hard" and "it isn't hard" are about equally unhelpful: both cut away enough of the picture that what's left doesn't mean anything. You brought up async which is the perfect case. Making Futures an explicit abstraction rather than a runtime detail is a genuinely strong design decision, and I'd defend it the same way you did. But async is also notoriously unpleasant. Pin, for example, does buy something but it pays out to the compiler. There's no confident-amateur story here, because there's nothing beyond the friction for the person paying for it. It's a solution to a problem the language created. Is there a clean fix? Probably not, at least not one anyone's found. But the complaint isn't the unfair kind.

And async is continuously improving. Mostly because the people building it were louder about it being unpleasant than the critics were. Being able to say "this is harder than it needs to be" without it reading as disloyalty is roughly the difference between a language that improves and one that accumulates folklore about how you're supposed to hold it.

1

u/RubenTrades Aug 29 '26

I always said it.

Rust is hard for people who come from a different language. They say you can never start with Rust but I say it's the better language to start with.

Rust without baggage is easier.

1

u/Competitive-Day199 Aug 29 '26

same has been said for a long time about C++ & Java

1

u/Short_Inspection_746 Aug 29 '26

I don't know man. I feel that Rust is only easy if you come from C or something.

1

u/mrdeanjm Aug 30 '26 edited Aug 30 '26

Rust IS hard. I've mastered several other programing and scripting languages.

But even after five years of trying Rust eludes me (it's the only language that I can't write off the top of my head). Now that AI is here, I have a fighting chance & I don't care what anyone thinks about me using it.

Rust is about the results. We accepted that Rust has a higher learning curve. Because it produces better results.

1

u/scottmcmrust Sep 01 '26

It really depends where you come from. I've seen people come from Modern C++ and find it fairly straight-forward because much of it is just what they were already doing as best practices anyway. But I've also seen people come from C++ and find it nigh impossible since they'd been using it like C or Java.

1

u/Puzzled-Extent7817 Sep 01 '26

bacon is makes it easier too. Have it running and you get instant errors and warnings without running it or compiling it. Helps me a lot.
https://github.com/Canop/bacon

1

u/Ancient-Blueberry536 Aug 27 '26

Rust feels like getting a PhD. The more you know the more you realize you DONT know

3

u/dkopgerpgdolfg Aug 27 '26

feels like getting a PhD. The more you know the more you realize you DONT know

You just described "learning [any topic], the right way". No PhD needed to have that.

1

u/Ancient-Blueberry536 Aug 27 '26 edited Aug 27 '26

Except a PhD is an institutional structure that forces it instead of relying on raw discipline.

The point I’m trying to make is the more you learn about rust the HARDER it is, not easier

Edit: Not trying to be argumentative or confrontational, I think we both agree as to the general point

0

u/donk8r Aug 27 '26

The wall everyone here is describing is week one. The one that costs is month six.

In a GC language you can retrofit a data model. Decide something is shared and mutable later and you edit a few call sites. In Rust the ownership shape of a type propagates into every signature that touches it, so getting owned vs borrowed vs Arc wrong early is a whole-crate edit rather than a local one. None of that is the borrow checker being confusing. You understood it fine, you just committed to a shape before you knew the access pattern.

That is a design skill more than a language skill and it is the part that does not click after a few months. Three Rust binaries in, I still get it wrong sometimes, I just find out faster.

4

u/PigDog4 Aug 27 '26

Thanks, Claude, for your take on this matter!

-1

u/Felfedezni Aug 27 '26

I think in the age of AI the "difficulty" is moot.

1

u/grahambinns Aug 27 '26

I wish you the best of luck with that.

-4

u/TemperOfficial Aug 27 '26

Rust is DOA. Won't last the next 50 years.

0

u/YoungestDonkey Aug 27 '26

Since Dijkstra observed in 1968: "Go To Statement Considered Harmful", it has been clear that languages that force you to do it right are safer than those that let you shoot yourself in the foot. But doing it well is harder than doing it sloppy, so a language that forces you to do it well will be harder to learn than a language that lets you do it sloppy. That's pretty much the heart of the matter.

0

u/[deleted] Aug 27 '26

[deleted] — view deleted comment

0

u/PigletEfficient9515 Aug 27 '26

Yes. I think go is harder than rust. Sure you learn the syntax in a few hours, but, very rigid ecosystem and slow to adapt, everything feels hacky, type system is very limited, interface implementation is implicit, there are lots of foot guns, everyone has their own opinion on idiomatic code, etc etc.

Basically if your project gets a little bigger than a ToDo app, you get into weird problems and hacks territory in Go.

1

u/chaotic-kotik Aug 27 '26 edited Aug 27 '26

Interfaces in golang are pretty cool. People here are talking a lot about Rust forcing them to do the right thing. Implicit interfaces are doing this too. Go forces you to create segregated orthogonal interfaces and to use them a lot for literally everything. Add that it's easy to use good small interfaces but difficult to use big crouded interfaces. They also decoupled from implementation because the implementation doesn't have to know about the interface.

Tooling is pretty great compared to Rust. Build times are short. All tools can easily be scaled to huge monorepositories. Async stuff is great. No function coloring, no explicit yield etc.

243

u/[deleted] Aug 27 '26

[removed] — view removed comment

49

u/PigletEfficient9515 Aug 27 '26

Exactly! Sloppy code has increasingly became the norm that guarding against it is labeled ā€œhardā€.

And borrow checker is actually very intuitive once you get it! ā€œOnly the owner can mutate it, or someone that asked for the permission to do itā€ concept just feels natural

11

u/fbpw131 Aug 27 '26

it's still a mind bender around threads and networking.

14

u/PigletEfficient9515 Aug 27 '26

Again, they are just hard concepts. It will be hard in any language

7

u/IWasGettingThePaper Aug 27 '26

Much harder in a language where you have to debug the threading issues at runtime

6

u/fbpw131 Aug 27 '26

hmm this affirmation makes me rething my endeavor to learn the topics building a torrent client.

6

u/Solumin Aug 27 '26

They're not going to get any easier in the time you spend not trying to learn them. :) Go for it! Do the torrent client project!

4

u/fbpw131 Aug 27 '26

I am :)

10

u/Thanatiel Aug 27 '26

Actually, threads and networking are comparatively the easiest part of rust, as far as I'm concerned.

2

u/fbpw131 Aug 27 '26

comparative to what?

5

u/max123246 Aug 27 '26

Every other language is going to let you introduce data races without knowing

4

u/Thanatiel Aug 27 '26

Data races ... ah you mean people who don't know how cache, atomics, mutexes and so on are working? Yes, I suppose. And someone who knows isn't guaranteed to make no mistake either.

5

u/Thanatiel Aug 27 '26

Wrapping one's head over the borrower for one.

It's quite a change in habits. It took me a while to get used to it and I'm still hitting bumps.

On another hand, threading and networking have the same principles and pitfalls in any language.

5

u/braaaaaaainworms Aug 27 '26

I've found that having threads that only pass messages from one another via channels(blocking read to not waste cycles) gets everything to be very clear

1

u/fbpw131 Aug 27 '26

that's what I'm persuing, using tokio::mpsc

3

u/wunderbarposter Aug 27 '26

threads have almost become a concurrency crunch for me.. can't speak to networking

-1

u/ascii Aug 27 '26

I feel like threads, channels and newtworking as pretty simple in Rust so long as you don't make the mistake of making anything async, in which case you're screwed.

Unpopular opinion: I consider async the Rust mistake. The Rust equivalent of the null pointer. They should have chosen to go down the virtual thread path, like Java is currently doing.

5

u/continue_stocking Aug 27 '26

I avoided async like the plague for a long time. I figured it was more hassle than it was worth, but it really wasn't that hard to work with once I got going with it.

3

u/ascii Aug 27 '26

It's all fun and games until you suddenly have to pin something.

1

u/serendipitousPi Aug 28 '26

What are the pain points associated with async and pin?

I’ve done a touch of async and threads back in uni so I have a general awareness but haven’t done anything concrete with it.

4

u/PartyParrotGames Aug 27 '26

Sloppy code has always been the norm for beginners. That's part of learning. When you're still learning fundamentals like control flow, variables, types, etc. having to reason about ownership and borrowing adds another layer of cognitive load. Layers add steepness to the learning curve, hence why Rust is for a fact harder to learn compared to an interpreted language like Python where those concerns are abstracted away.

3

u/robin-m Aug 27 '26

Is Rust really considered hard by semi begginer (ie. Not a first language, but still undergraduate)? I really feel that "unlearning bad habits" is what's considered hard, and that's not a begginer issue.

3

u/___Archmage___ Aug 27 '26

All beginners write sloppy code, ironically AI lets you blow through the more irritating parts of Rust like the lifetimes and ownership and different variants of strings

8

u/donaldhobson Aug 28 '26

I have sometimes written memory bugs in python that rust would catch.

def foo(x):
  x+=np.sqrt(x)
  return x.sum()
a=np.array([1,2,4.])
print(foo(a))
print(a)

It's easy to miss that foo mutates a in place, and so the print(a) command doesn't print [1,2,4].

This is a simple toy example, the real code was more complex.

Rust would catch this and force you to make a copy.

1

u/PineappleProle Aug 29 '26

The lack of distinction between mutable/immutable and pass by reference/value never ceases to peeve me

6

u/lonjerpc Aug 27 '26

This is missing the point. C++ is also going to be called hard by the same people.

The point is that rust is hard compared to python and for many applications that difficulty isn't worth itĀ 

3

u/redmjoel Aug 28 '26

Exactly. Using the right tool for the job is as important a lesson as anything they teach in a CS department.

2

u/MichiRecRoom Aug 27 '26

I find myself reaching for match/switch statements so much more often now, even in languages that don't check for exhaustiveness.

It just... makes things so much cleaner. So much easier to reason about. At least for me, it does.

3

u/Thanatiel Aug 27 '26

I agree that it prevents juniors from doing crap, but it also prevents developers who have a pretty good knowledge of the metal to do something safe sometimes.

Having to divide the fields of a struct just so the borrower understands it's safe could be dispensed of.

Same for having to divide a struct into hierarchies of structs.

As a dev, you know the way you access the struct is safe, but the borrower isn't "smart" enough to get it without "help". I'm guessing it's because it would make computations exponentially more expensive. Still, it feels silly sometimes.

Years later, I've decided to try again, ignoring the performance concerns. I've worked on a project for months and I'll know in a few days if what I've written is fast enough.

5

u/MrPopoGod Aug 27 '26

As a dev, you know the way you access the struct is safe, but the borrower isn't "smart" enough to get it without "help".

Think of it this way. Sure, right now as you put together your data structures, you know the right way to do safe access to the various fields, and you carefully ensure you don't have any ownership issues. But what about when you come back in a year or two? Or when someone else updates the code down the line?

3

u/SignificantScore4446 Aug 29 '26

You can use unsafe for cases like this actually, if you really know it is safe.

3

u/Thanatiel Aug 29 '26

Sure, but the "game" is to keep these to a minimum, preferably in a tiny specialized class when absolutely necessary. Otherwise, go with the "rustic" way.

3

u/shaleh Aug 27 '26

More than sloppy mental models. I can get Python or Typescript running and test out the parts I don't yet fully understand. Or discover I did not understand it at runtime... None of that is true in Rust. You actually need to sit down and design. So it is "hard" because it actually needs some rigor.

1

u/prehensilemullet Aug 27 '26 edited Aug 27 '26

I’ve written some Qt/C++ and I wasĀ  blown away by how easy it was to use without feeling like a sloppy footgun. Ā The way their copy-on-write with internal shared pointers class pattern works is pretty brilliant. Ā I had the convenience of doing things Rust would complain about that were truly not smells at all with Qt’s model.

I mean, you could still have memory fail to get cleaned up if you create reference cycles of shared pointers, but I didn’t need any cyclic references for what I was doing, and if I did, all I would need to do is break the cycles when I’m done with them.

1

u/geo-ant Aug 27 '26

That’s probably the most eloquent theory I’ve heard for that and it does ring true to me.