From ba3c6b0de9e5a208910134ed4c3784de71077e47 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sat, 7 Jan 2023 16:46:28 +0100 Subject: [PATCH] =?UTF-8?q?Speaker=20notes=20for=20=E2=80=9CModern=20Featu?= =?UTF-8?q?res=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/why-rust/modern.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/why-rust/modern.md b/src/why-rust/modern.md index 05b6df5b..2ed58096 100644 --- a/src/why-rust/modern.md +++ b/src/why-rust/modern.md @@ -13,3 +13,39 @@ Rust is built with all the experience gained in the last 40 years. * Great compiler errors. * Built-in dependency manager. * Built-in support for testing. + +
+ +Key points: + +* Remind people to read the errors --- many developers have gotten used to + ignore lengthly compiler output. The Rust compiler is significantly more + talkative than other compilers. It will often provide you with _actionable_ + feedback, ready to copy-paste into your code. + +* The Rust standard library is small compared to languages like Java, Python, + and Go. Rust does not come with several things you might consider standard and + essential: + + * a random number generator, but see [rand]. + * support for SSL or TLS, but see [rusttls]. + * support for JSON, but see [serde_json]. + + The reasoning behind this is that functionality in the standard library cannot + go away, so it has to be very stable. For the examples above, the Rust + community is still working on finding the best solution --- and perhaps there + isn't a single "best solution" for some of these things. + + Rust comes with a built-in package manager in the form of Cargo and this makes + it trivial to download and compile third-party crates. A consequence of this + is that the standard library can be smaller. + + Discovering good third-party crates can be a problem. Sites like + help with this by letting you compare health metrics for + crates to find a good and trusted one. + +[rand]: https://docs.rs/rand/ +[rusttls]: https://docs.rs/rustls/ +[serde_json]: https://docs.rs/serde_json/ + +