News for hackers. Stuff that matters.
Re:Rust 101 by Charlie_e on Wednesday April 10, 2024 @08:25AM (#39989920)
Great write up, perfect to share with people who want to know what makes Rust tick before/without learning it more thoroughly.
Re:Rust 101 by samuelec on Wednesday April 10, 2024 @08:22AM (#39989894)
What about lifetimes?
Re:Rust 101 by hermanradtke on Wednesday April 10, 2024 @08:31AM (#39989952)
A Rust 101 intro does not need to concern itself with lifetimes.
Re:Rust 101 by pornel on Wednesday April 10, 2024 @10:42AM (#39991241)
Indeed, overuse of lifetimes is a common novice mistake. In most real-world programs lifetime annotations are very rarely needed.

The worst disaster of nonsensical <'a> exploding everywhere comes from novices trying to use Rust's references to store objects "by reference" in a struct, without understanding that in Rust references have a completely opposite meaning that forbids storing the data.

Re:Rust 101 by samuelec on Wednesday April 10, 2024 @11:57AM (#39992169)
Still that you can't just avoid to explain lifetimes. There is a lot of code out there witch uses lifetimes
Re:Rust 101 by hbcondo714 on Wednesday April 10, 2024 @06:34PM (#39996411)
There is also rust-script[1] which runs "Rust files and expressions as scripts without any setup or compilation step." I wrote a data loader[2] in it for my Observable Framework project and have been very happy with its performance and overall ease including hot-reloading.

[1] https://rust-script.org

[2] https://observablehq.com/framework/loaders#routing