Re: [PATCH] git-mv.perl: use stderr for error output and cleanup
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:16
merlyn@stonehenge.com (Randal L. Schwartz) writes:
quoted
quoted
Being as I'm a *bit* familiar with Perl, I'd write that as: print H "$_\0" for @deletedfiles;... It was added for Perl 5.5, first released on 22 July 1998.
BTW, I never understood the usefulness of Statement Modifiers.
Even reading the examples in perlsyn.pod:
print "Basset hounds got long ears" if length $ear >= 10;
go_outside() and play() unless $is_raining;
seeing "do these things" upfront and then realize "ah, but that
is done only when this holds true", interrupts the flow of
understanding while reading a program by somebody else [*1*].
It is worse if the Statement Modifier is a loop control.
(flamebait) Compound Statements take BLOCK and people who want
to do a one-liner could not do so without braces. I've always
thought Statement Modifies as a lame workaround for that
problem.
[Footnote]
*1* This is true even for me; my mother language is Japanese,
which tends to hang negation at the tail of the sentence, and
double negation is not unusual. This makes it impossible to
know what a sentence states before reading it to the end, so I
am used to that "coming back to the main part after reading
through the sentence", but I do not welcome that when I am
reading programs.