From 2ceced9bda9b2b852ace7efe1df0e1f96c7b6806 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Fri, 4 Sep 2020 23:29:17 +0200 Subject: Add boats's exploration of the "explicit" argument --- reviews/blog-roll.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/reviews/blog-roll.md b/reviews/blog-roll.md index 08ffaf9..3b7f08c 100644 --- a/reviews/blog-roll.md +++ b/reviews/blog-roll.md @@ -288,3 +288,43 @@ back the stack? [Joe Duffy's Blog]: http://joeduffyblog.com/ [The Error Model]: http://joeduffyblog.com/2016/02/07/the-error-model/ + +# [Without boats] + +## [Not Explicit] + +:::: tags +- Rust +- Language design +:::: + +Picking up where Aaron Turon's ["reasoning footprint"] post left off, +and breaking down "explicit" into more precise epithets: + +"Noisy" +: `try!()` is noisier than `?`, which works in the latter's + favor. + + > Often - especially when forwarding errors, as `?` does - the early + > return is the least important part of the source code to me. + +"Burdensome" +: aka "syntactic salt"; can be deliberate in order to + discourage. + +"Manual" or "opt-in" +: e.g. if Rust required an explicit `.drop()` on variables, instead + of systematically freeing them when they go out of scope. As + things stand, a variable's eventual de-allocation is "explicit", + as in, it follows non-ambiguously from reading the source code; + yet it is also **automatic**. + +"Local" +: "explicit within some scope". Method resolution is explicit (as + in, deterministic and unambiguous) but one('s IDE) must jump + around to figure it out. `?` is local to the very line where the + early return happens. + +[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 -- cgit v1.2.3