I feel like if you treat temporary variables as documentation they feel less icky. All these examples with the pipeline operator cause way more mental overhead than reading temporary variable names.
I feel like if you treat temporary variables as documentation they feel less icky. All these examples with the pipeline operator cause way more mental overhead than reading temporary variable names.
I think it really depends on what operations you are applying. Having one succinct named variable like $slug with a few simple pipeline calls like in the example is "self-documenting" and easy to read. However, some lambdas and non-standard function are definitely a place for nicely named temporary variables in my opinion.