a perl question
RW
rwmaillists at googlemail.com
Wed Jan 5 22:15:44 UTC 2011
On Wed, 5 Jan 2011 08:05:14 -0800
Chip Camden <sterling at camdensoftware.com> wrote:
> Quoth Chad Perrin on Tuesday, 04 January 2011:
> > The weirdest thing about most useless uses of cat is that not using
> > cat would actually be a little clearer and involve fewer keystrokes
> > -- as in this case.
> >
> I blame OOP. Programmer thinks about the data stream before they
> think about the process. It's a nouns-first orientation.
You might easily get the same prejudice from data flow diagrams - or
plumbing.
Personally I find that using cat makes things simpler and less error
prone when reusing pipelines in shell history.
For example it's easier to edit
cat file | foo
into
cat file | bar | foo
or cat file? | foo
than editing
foo < file
into
bar < file | foo
or cat file? | foo
More information about the freebsd-questions
mailing list