Re:How I Wrote a Modern C++ Library in Rust
by valarauca1 on Monday December 03, 2018 @02:26PM
(#18592050)
`cargo new $project_name` literally generates a hello world program so it is misleading to say you need to understand ownership to write `hello world`.
That being said ownership is rather hard, but liberal usage of `.clone()` can get you pretty far.
Re:How I Wrote a Modern C++ Library in Rust
by nickpsecurity on Monday December 03, 2018 @03:00PM
(#18592341)
That's a different subject entirely. Beginners should learn from resources teaching fundamentals, both primitives and patterns like abstraction/decomposition, using a simple language with minimal, incidental complexity. Once they grok that, my next recommendation is using another simple, but real-world, language like Python or Go with lots of code they can practice on. Read, modify, and debug. Then, with key skills, they can tackle hard stuff like C, C++, and Rust.
Pyret at pyret.org is a good candidate since there's a group called Bootstrap successfully teaching it to middle schoolers. That's bootstrapworld.org.
Far as Rust, Ill also note people exploring the language or doing quick-and-dirty coding can just use reference counting if they want. Rust supports that. There's a performance hit but that's probably fine in those use cases.
Ownership is a hugely important part of designing programs, and it's something people need to come to terms with eventually, but a language where you can't do even hello world without understanding ownership adds a lot of mental overhead to the learning process when someone is still not even comfortable with for loops and function calls.