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 subscribed, and it's so much easier to understand the borrow checker!
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.
Doing AoC with Rust really has been the best way to practically learn these things. Loving learning this awesome language!
People complain about side effects and then proceed to complain about a language that throws in your face when you're about to create a side effect
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!
Wow that last example was perfect. Thanks for doing this prime! It makes it so much clearer!
Me (JS/TS dev): start learning Rust. Primeagen: makes video "Rust for JS devs". Love it :)
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 🤙
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
Learning c and c++ and it sounds like how shared pointers and unique pointers planned to work but no one thought them through
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.
The Rust Book actually explains this pretty well when I read it.
I'm down for the borrow checker. Doesn't bother me at all. Great video. maybe I subscribe as Rust is new into my toolset. Complete beginner on Rust
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.
@ThePrimeagen