"a + b + c + ... for Rust strings takes linear time, not quadratic, and has no weird side effects or special casing"
miniblog.
Related Posts
It's really satisfying fixing crashes in rust-analyzer. You can start from a panic message and dig until you've got a tiny Rust program that triggers the problem.
(It's usually an issue with incomplete source files breaking invariants.)
Today I learnt about clippy::clone_on_ref_ptr, which complains about t.clone() on a Rc<Thing>. You write Rc::clone(t) instead, so it's obvious it's a cheap clone.
It's a nice approach, because it makes the expensive clones more obvious.
It's funny how languages can offer multiple forms of syntax, but formatters standardise to a single form.
E.g. single vs double quotes in JS, optional semicolons in JS, different ways of grouping imports in Rust.
Should new languages be more syntactically opinionated?