And what I realized was that, as fashionable as it is to say these days that imperative code is the devil, Rust's (deeply) const-by-default local variables remove one of the main reasons people have for nesting their expressions inline: avoiding the creation of state that has the chance to be mutated. And I also found that giving names to those intermediate steps can really help improve legibility. For me, Rust has made imperative code cool again, while also allowing for maximally expressions-based code (even more than JS in some ways!) where it makes sense.
This is one of the hardest parts about writing examples: you want something that's real, but also not long. Very difficult.
In my experience, this gets ugly rather quick.
But yeah, I hope the pipeline operator comes soon, chaining is nice, but nesting can get quite messy.
Worst thing ever. I was trying a gfx-rs example to do some drawing. One smallish function took another function as a parameter (a closure actually) so they just wrote an entire drawing function inline. The pipes helped clue me in that something strange was going on.
My own code pulled that function out into a clean definition eventually. As it should have been in example code.
It's not in the name of conciseness. Not sure what it is, but it's not that.