top | item 44509203

(no title)

kriz9 | 7 months ago

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.

discuss

order

V__|7 months ago

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.