Closed cshbicos closed 2 years ago
I would argue that it is Pretty printer that must evolve and not you that must be stuck in the past. While that doesn't happen, if I'm not mistaken, if you align them manually, pretty printer will not mess with them. So, while Pretty printer is not fixed, I'd rather do it manually than reverting to CALL METHOD.
Pretty printer apparently does now support this on a recent enough release, at least that's how I understood the patch notes:
@flaiker - just tested on a recent release, can confirm it's exactly this.
Before pretty printer: After pretty printer:
That's great news about that new Pretty Printer option - sounds like having the cake and eating it too!
Thanks for pointing it out @flaiker!
While I agree that functional calls to methods are better due to chaining and also avoid superfluous text, I found that the loss of parameter alignment (section "Align parameters") through Pretty Printer usually tips the balance in favor of procedural calls.
Every time the maximum parameter length is changed, it is annoying to add/delete white spaces to align again. Especially with larger refactoring, this can be quite time consuming.
Maybe I've missed some magic trick, but running pretty print against
will make the parameters align again beautifully, while running pretty print against this
keeps the parameter list all unwieldy and jagged.
Personally, I prefer a clean indentation provided & maintained automatically - even it that means taking a hit on missing out on chaining.