Love the Rust vs Typescript video ideas. It makes Rust easier to understand when you compare it with Typescript and how things are working behind the curtain, your explanation is top notch, keep being great Prime Nice AD too
you've made a difficult subject simple. Well done.
I would LOVE more “Rust for Typescript developers” styled videos. I just started learning Rust with advent of code as well, and have found a lot of things in Rust to be less scary because I know Typescript, while also finding plenty of things that are confusing 😂. This video was SERIOUSLY helpful, you have a fantastic ability to teach concepts like these. Thank you prime and happy holidays!
As many before has said, this comparison format (DX I guess) is super nice! For me, someone who hasn't had time to dive in yet but is wondering how the water feels it really hit a spot. More of this stuff please!
I cannot understand why people say that the borrow checker is complex, it does what a C/C++ programmer should be doing when using pointers. Rust people found a brilliant way to automate that reasoning inside tools.
I learnt rust during first lockdown for around a month, and almost never touched after that. It was sort of like revision. You did fantastic job explaining important yet confusing concept in simplest way possible.
I subscribed, and it's so much easier to understand the borrow checker!
Doing AoC with Rust really has been the best way to practically learn these things. Loving learning this awesome language!
Wow that last example was perfect. Thanks for doing this prime! It makes it so much clearer!
Thank you @ThePrimeagen, a year after you made the video. I've been going through Advent of Code 2023 (I know, I'm slow) to try to learn Rust and foolishly only did a couple chapters of The Rust Book before switching just to solving problems. Especially with Copilot's assistance, I've been able to work out how to add `&` and `mut` to make my code compile, but I didn't understand why until this video. I had to rewatch every lesson of this video 2-3 times, but now I feel I finally understand this concept that was repeatedly tripping me up.
I've been struggling in Advent of Code in Rust and the bit at 06:04 sums up perfectly why - Not knowing if a std function, usually an iterator method, mutates in-place or returns a copy. It leads you to a thorn bush of compiler errors. I guess this is just something you learn over time doing Rust? New merch idea - make a cheatsheet for this, and print it upside down on a T-shirt!
I recently came across a blog suggesting to always make your arrays read-only in typescript. This has really helped med to avoid all the inplace array functions screwing up my data when it's not intentional. It also behaves more like rust immutable arrays. Great video. Keep it up 🤙
Me (JS/TS dev): start learning Rust. Primeagen: makes video "Rust for JS devs". Love it :)
These three types of values in rust (owned, reference, mutable reference) reoccur everywhere in the language. For iterators, we have .into_iter(), .iter() and iter_mut() for the same three types. For functions we have FnOnce (consumes the value, can therefore only be called once), Fn (takes a reference: can therefore be called multiple times), FnMut (takes mutable reference). It's a very nice language design.
Wow, the borrow checker blew my mind time after time after time. I felt like I was really stuck in a rut and unable to move forward. That is, until I clicked the subscribe button. Suddenly, everything just clicked. Really revolutionary
Had multiple “aha!” moments during the span of this short video. Very concise and to the point. Thank you lots for this, it’s very helpful!
First explanation of the borrow checker that actually makes sense, tried a couple of days ago asking chatGPT to rephrase it multiple times with no success, probably not enough blazing speed and momentum
Having written quite a bit of C++ code, it is extremely freeing to have the compiler check things like ownership. Not only does it make code the more safe, it also becomes more difficult to make dumb architecture decisions.
I didn't understood the borrow checker until I subscribed. Thank you Primeagen, you saved my life
@ThePrimeagen