git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-mv.perl: use stderr for error output and cleanup

From
Junio C Hamano <junkio@cox.net>
Date
Jan 7, 2006, 21:04 UTC
Message-ID
<7v7j9bg369.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<86sls0498w.fsf@blue.stonehenge.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
Show 5 quoted lines
>>> 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.

Previous: Randal L. SchwartzNext: Andreas Ericsson
Message 12 of 14 in “git-mv.perl: use stderr for error output and cleanup”
  1. git-mv.perl: use stderr for error output and cleanupAlex Riesen, Jan 5, 2006
  2. Junio C HamanoJan 6, 2006
  3. Randal L. SchwartzJan 6, 2006
  4. Linus TorvaldsJan 6, 2006
  5. Randal L. SchwartzJan 6, 2006
  6. Linus TorvaldsJan 7, 2006
  7. Junio C HamanoJan 7, 2006
  8. Alex RiesenJan 7, 2006
  9. Junio C HamanoJan 7, 2006
  10. Alex RiesenJan 10, 2006
  11. Randal L. SchwartzJan 7, 2006
  12. Junio C HamanoJan 7, 2006
  13. Andreas EricssonJan 8, 2006
  14. Alex RiesenJan 10, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.