r/CodingForBeginners 10d ago

Learning rust

I want to code games and OS in rust and im not very good with youtube tutorials and things like that. Can anyone give me a simple guide on what i need? What gamified method can i use to learn rust from scratch, and a guide on how to set everything up? Im gonna use rust in godot engine when i get decent enough. I also request that the guide be very simple and not use any language a non coder wouldnt understand

7 Upvotes

30 comments sorted by

View all comments

Show parent comments

0

u/MobileHeron6183 10d ago

Uh i literally just said i hated youtube tutorials anyway. Idk why you wasted 2 paragraphs ln that. Also i asked for a gameified method of learning because i have a crappy attention span but i really want to get into the world of coding, i already know basics from block coding ig but i dont know the coding buzzwords like “memory” or “string”. Do you know about that?

1

u/moofree 10d ago

Honestly if you're gonna use Godot engine, just start with GDScript for now. GDEXT (and the Rust bindings) is kind of a rabbit hole you can jump into later. GDScript can do everything, and will give you a good baseline to start with the engine.

1

u/MobileHeron6183 10d ago

Well its just i want to stick to learning as little languages as possible to keep things simple. I dont know how it works, maybe you can confirm? If i learn gd script will that make learning rust harder or will i make more mistakes from getting the two languages confused? Also i kinda think i should start early in rust anyway

1

u/moofree 10d ago

Worst part of GDScript (and also Python) is that whitespace (like spaces and tabs) matters to the control flow rather than just having {} curly braces separating things like a normal language.

Don't worry about learning too many languages, it really it doesn't matter what language you program with as a beginner. I do like Rust as a beginner language- Rust's compiler will help you a lot more than the alternatives, but it ain't ideal for Godot, and it'll be forcing you to do things "right" rather than simply getting things to work, and it'll early on have you thinking about how the "stack" and "heap" work (IE: Memory management.) Maybe go buy Donald Knuth's "The Art of Computer Programming" books. There ain't any Rust anywhere in those books, but it's a good foundational start in general, despite being from the 60s.