4 ms·
Rust 101
- deleted 3y ago[deleted]
- samuelec 3y agoWhat about lifetimes?
- hermanradtke 3y agoA Rust 101 intro does not need to concern itself with lifetimes.
- justincredible 3y ago[dead]
- pornel 3y agoIndeed, 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.
- samuelec 3y agoStill that you can't just avoid to explain lifetimes. There is a lot of code out there witch uses lifetimes
- Charlie_e 3y agoGreat write up, perfect to share with people who want to know what makes Rust tick before/without learning it more thoroughly.
- hbcondo714 3y agoThere 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 https://rust-script.org [2] https://observablehq.com/framework/loaders#routing https://observablehq.com/framework/loaders#routing