in reply to Re: Refactoring just to refactor?
in thread Refactoring just to refactor?

++

I fully subscribe to that. Well said!

One more note I cannot resist here: reformatting/restyling sometimes "improves" readability for some where it "obfuscates" for others. When in a team get consensus.

Some changes might yield the same underlying code and thus seem to be just styling:

$ perl -MO=Deparse -e'$a = 1 unless $b;' $a = 1 unless $b; -e syntax OK $ perl -MO=Deparse -e'$b or $a = 1;' $a = 1 unless $b; -e syntax OK

but where some see a change from first to second or vice versa as a readability improvement, others might percieve this as plain obfuscation. Not all minds work alike.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: Refactoring just to refactor?
by hippo (Archbishop) on Jun 28, 2019 at 08:38 UTC
    When in a team get consensus.

    And with that in mind, use a .perltidyrc and hook it into the commit workflow. Do this even when not in a team for (a) practice and (b) self-enforced consistency. It then makes later global reformatting a doddle too.

    I agree with everything davido said and the other replies to him.