3 ms·
The main advantage is Rust's ownership model. It allows you to catch most memory problems at compile time. https://doc.rust-lang.org/book/ownership.html https:
by Cyph0n 11y ago
The main advantage is Rust's ownership model. It allows you to catch most memory problems at compile time.
https://doc.rust-lang.org/book/ownership.html https://doc.rust-lang.org/book/ownership.html
- akadien 11y agoAnd it's one of the languages features that has a very steep learning curve. Rust forces your design into its model. Interestingly, rustc also seems to generate programs that leak memory. I recall an issue where the simple and venerable "hello world" program in Rust (i.e., println!) had memory leaks.
- steveklabnik 11y agoThat shouldn't be true. Please file bugs!
- akadien 11y agoIt was fixed but isn't fixed. https://github.com/rust-lang/rust/issues/19776 https://github.com/rust-lang/rust/issues/19776
- steveklabnik 11y agoGreat, thanks.