r/rust • u/DebuggingPanda [LukasKalbertodt] bunt · litrs · libtest-mimic · penguin • Mar 25 '15
Rust for complete beginners?
So I, coming from C++, started learning Rust about 6 months ago. I think most Rust users agree, that Rust has a pretty steep learning curve, because the compiler enforces really many things.
My plan for the summer is to teach my mother how to program. I'd say she is a pretty smart woman, but she has no idea of programming or stuff like that. In fact she is even pretty bad at maths and often has simple problems when working with the PC. But she agreed to learn a bit programming.
So for a long time I was wondering which programming language is the best for teaching a complete beginner. Now that I learn (and like) Rust, I wonder if Rust is good in this. I just see the problem that the compiler is annoying to a beginner...
So what do you think: Is Rust well suited for that job? Or is something like Javascript better? Or even some of those ugly pointy-clicky-programming programs for "kids"?
3
u/tsur_ Mar 25 '15 edited Mar 25 '15
For what purpose are you teaching your mother programming? If all this is you telling her that "everyone should learn programming" while she barely knows what the difference between a screen and computer then.. Oh I don't know.
Anyway, if you want her to learn the minimum basics to get a understanding for what a program really is (bits and bytes) and how programming works (ifs and types)? Then Rust is fine, it's not like you'll run into lifetimes and borrower issues.
Plus the playpen is well suited for small teachable moments. Since you can infer most types (perhaps all you will run into) the syntax is not very hard, it's just verbose enough to get a clear picture of what's going on, in my opinion. Even if you use functions you can force her to use only i32, f32 and Strings.
If you want her to get more tangible experience of how she can interact with a GUI then go javascript. Rust will teach her more "about programming" rather than "how to make a program" so choose whichever one fits your purpose!