r/rust • u/PolyMathinst • 3d ago
Rust as your first language
Quick question here boys and girls
I was discussing with one of my friends about whether you should go from a high level language to a lower one
Do you happen to know anyone who learned rust as their first programming language and how many of yall think it’s a bad idea ?
0
Upvotes
14
u/pokemonplayer2001 3d ago
You’re overthinking this, just do it.
7
u/QuasiRandomName 3d ago
Rust has some steep learning curve. I would not recommend it as a first language. The actual recommendation would depend on the background and overall computer knowledge.
2
u/norude1 3d ago
doesn't really matter, pick one and get good at it
2
u/fersegv 2d ago
Not my first language (I came from TypeScript/Angular), but I've been building a Wayland compositor in Rust lately and honestly I'm glad I didn't start with it. The borrow checker is way easier to get once you already know what a pointer or a reference is and why it matters. If you start with Rust you're learning programming and fighting the compiler at the same time. Not a bad idea if you're stubborn, just a steeper first month XDD
2
u/webnixspace8 2d ago
Honestly, starting with Rust can actually be easier in one way: you don't have to unlearn bad habits from dynamically typed languages, and the compiler explains why something is wrong instead of letting you ship silent bugs. The only real trap is trying to learn basic programming logic and Rust's ownership/lifetimes at the exact same time. If your friend sticks to owned types (String, Vec, .clone()) for the first month and builds small CLI tools before touching references or async, it's totally doable.
2
u/andreicodes 2d ago
I taught my wife programming and we used Rust. Compiler messages are godsend.
You can carve out a smaller subset of Rust that is essentially a modern better C, and it's a great foundation to build your understanding from.
2
u/andreasOM 3d ago
I've been teaching programming at university level for the past 30 years, covering everything from machine code and assembly to procedural, object-oriented and fourth-generation languages. Pascal, C, C++, Smalltalk, Java ... you name it, I've probably taught a course on it at some point.
Due to a recent shift in focus, I've stopped teaching full-time but still run summer courses now and then.
This summer, I taught a short introductory programming course (12 sessions of two hours each) ... in Rust.
Some of the best results I've seen in 30 years of teaching. Only beaten by the early years, when the audience was very different.
Grain of salt:
My university students had to learn programming.
These kids wanted to!
P.S.: Before anyone asks: I was paid to develop the course, so unfortunately I can't share the course materials.
1
u/nibsbin 1d ago
I don't think it's a good first language because it kinda hides how computers work (stack and heap allocation) with its own abstraction of memory management. C for hardware intuition or Python/TS/C# for high-level problem solving would prolly be a better first language
0
u/dethswatch 3d ago
bad idea- if you need it, you'll eventually know it.
Start with python or js like everyone else.
-1
u/mrflash818 3d ago
In my humble opinion:
I would learn the basics / foundation of "C" first.
Know about pointers, scope, and manually creating and freeing dynamic memory.
With that as a foundation, then learn RUST.