Rust Is Easy

preview_player
Показать описание
Today I propose learning Rust in an unusual way: Let the compiler teach you.

🖊️ Corrections are in the pinned ERRATA comment.

🙏🏻 CREDITS & PROMO
My name is Tris Oaten and I produce fast, technical videos.

👏🏻 Special thanks to my patreon sponsors:
- Affax
- JC Andrever-Wright
And to all my patrons!
Рекомендации по теме
Комментарии
Автор

ERRATA

8:18 the windows installer is a console installer, not graphical, though you can double-click the installer. (or use winget install -e --id Rustlang.Rustup)

NoBoilerplate
Автор

Addendum to "If the compiler is happy, I am happy": "If clippy is happy, I am very happy"

tylerbloom
Автор

Find someone to love you as this guy loves Rust

insideTheMirror_
Автор

Two of my own notes that I think are important.
1: Don't rely on the rust error messages that your IDE gives you.
IDEs very often take some pieces of the error message but leave a bunch of details out.
Whenever its not immediately obvious what an error is saying, go to the terminal and run `cargo check` or just `cargo c`, and you legit often get help messages as useful as the ones in this video.

2: The compiler isn't always correct.
The error messages can be extremely good, but the compiler does not know your intention.
It can make a best guess, but its not always what you meant.

theroboman
Автор

The transition from “your code doesn’t work, figure it out” to “your code doesn’t work, try this to fix it” is so extremely helpful that it halfway defines what makes Rust so great.

NStripleseven
Автор

I just want to build something one day that someone loves as much as this guy loves rust.

someghosts
Автор

Never seen a compiler so happy while being abused in such terrible ways

MilanRubiksCube
Автор

As someone who started coding earlier this year and mostly worked with TypeScript, this honestly makes Rust sound a lot more interesting than I previously thought. JS frameworks have gotten me so used to useless error messages that having the compiler itself tell me what's actually wrong feels like a breath of fresh air.

kochkochkoch
Автор

crazy how No Boilerplate's videos are the only ones making me more excited to code, even though I like coding already

AllemandInstable
Автор

As a python TA in college I feel that a good chunk of my job is reading error messages with students, that moment of realization is great. But this feels like a whole other level.

jonyleo
Автор

As someone who struggled with not just Rust but programming in general for a good while I find your videos second to none. I feel you don't just show how something is done, but also why you do it. Your videos helped me shake off bad habits, one of them being ignoring error messages. I must also say you just are a great lecturer, you can break down complex topics in super understandable language without compromising on info. Something I really admire.

Great video as always. ❤

della.
Автор

I love this modern language design decision of having the language itself instruct the programmer. Elm does this spectacularly, and I'm excited to try it out in a lower-level language like Rust.

fabiolean
Автор

This video reminds me of something my math teacher once told me: "my pen is smarter than I am". She meant that by writing down what I know about a problem, I give myself help by being able to see the problem one step further along. Helpful error messages are the unsung heroes of programming.

b_dawg_
Автор

I've been doing Advent of Code using Rust because your series inspired me. I was kind of nervous picking up a systems language* because I made the mistake of trying to learn coding initially via C++. I've got a few years professional experience using JS, Python, and PHP now and have found learning Rust to be a delightful challenge.

Keep up the excellent work!

Shnugs
Автор

I often describe the rust compiler as a helpful nanny, walking you through your mistakes and giving suggestions on how to correct them.

sitton
Автор

i cannot believe it knows what other languages look like and can tell you how to translate.

tudbut
Автор

This definitely changed my view on Rust. It appears my main issues with it resulted from my under-utilization of the compiler output

funkemunky
Автор

I've been trying to learn rust on and off for a month now, your channel is really helpful, the videos are fast, straight to the point, and simply amazing.

thatlittlefrog.
Автор

Also very nice to use cargo clippy once in a while or use it in CI for bigger projects.

It feels like a code review, only you don't need to wait for someone to actually do a code review :D Often with really nice code styling suggestions.

TAINCER_
Автор

Errors are also not always clear (for new people).
I had a fight with "Futures" error and it turns out that the only thing you needed to do was to add ".await"

The "borrowing" is also a big fight I once in a while have.
In a lot of cases it is a trial and error until it compiles. Then you wonder what I did wrong and in the end Rust compiler is right all along.
It is showing me potential errors I am not even aware of.

olafbaeyens