commit 24bb4465c0989d1f716cf62aaa33302516c726f3 parent 39163472677ab9619e43607020fd430b8667c2a7 Author: Kévin Le Gouguec <kevin.legouguec@gmail.com> Date: Thu, 22 Apr 2021 09:04:19 +0200 Note down takeaways from a fasterthanli.me article Diffstat:
| M | reviews/blog-roll.md | | | 34 | ++++++++++++++++++++++++++++++++++ |
1 file changed, 34 insertions(+), 0 deletions(-)
diff --git a/reviews/blog-roll.md b/reviews/blog-roll.md @@ -328,3 +328,37 @@ and breaking down "explicit" into more precise epithets: [Without boats]: https://without.boats/ [Not Explicit]: https://without.boats/blog/things-explicit-is-not/ ["reasoning footprint"]: https://blog.rust-lang.org/2017/03/02/lang-ergonomics.html + +# [fasterthanli.me](https://fasterthanli.me/) + +:::: tags +- Rust +- Go +- Language design +:::: + +In-depth explorations of various topics (I mostly read posts covering +programming language mechanics), told in a dialectic and very +entertaining style that sustains interest over their Homeric lengths. + +## [What's in the box?](https://fasterthanli.me/articles/whats-in-the-box) + +:::: tags +- Rust +- Go +:::: + +> The Rust compiler is trying to help us. "You can't just return a +> reference to something", it pleads. "You need to tell me how long +> the thing that's referenced is will live". + +> * How does one return different error types without forcing a heap +> allocation? + +… preferably without having to maintain an ever-shifting enumeration +of possible error types? + +Spoiler: there's no escaping the `enum`, but at least +[`thiserror`](https://lib.rs/crates/thiserror) lets us focus on *just* +the enumeration, and generates the boilerplate for the `Display` and +`From` traits.