this post was submitted on 26 Aug 2024
138 points (97.3% liked)

Programming

17313 readers
252 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
138
How to learn Rust? (self.programming)
submitted 3 months ago* (last edited 3 months ago) by MoonlightFox to c/[email protected]
 

I want to learn Rust. There are so many resources available and I am unsure which one to go for, and if there are any tips on getting started?

I am a software developer by trade

Edit: Thanks for all the great replies!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 3 months ago (1 children)

What is the borrow checker and why are people so frustrated by it?

[–] [email protected] 3 points 3 months ago (1 children)

Very TL;DR version: a variable has an owner. If you pass it off to another function, you no longer own it and can't use it until/unless it gives the variable back. Rust can be really strict on making sure you aren't trying to use something you don't own at that time. The documentation explains it better than this (and I wrote a longer post but accidentally closed the window and lost it). See also mutability and lifetimes for some pain points people might not be used to.

[–] [email protected] 2 points 3 months ago

Thanks for the answer!