Date: Wed, 5 Jan 2011 22:15:38 +0000 From: RW <rwmaillists@googlemail.com> To: freebsd-questions@freebsd.org Subject: Re: a perl question Message-ID: <20110105221538.26daeb0d@gumby.homeunix.com> In-Reply-To: <20110105160514.GA94459@libertas.local.camdensoftware.com> References: <117654.42578.qm@web121409.mail.ne1.yahoo.com> <AANLkTinEksoXQAA4ZAziE59h%2BLRTxSgSy2WZy6UaQne%2B@mail.gmail.com> <4D231CB7.2060902@teambox.fr> <86pqsc3774.fsf@red.stonehenge.com> <20110105062401.GB74123@guilt.hydra> <20110105160514.GA94459@libertas.local.camdensoftware.com>
index | next in thread | previous in thread | raw e-mail
On Wed, 5 Jan 2011 08:05:14 -0800
Chip Camden <sterling@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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110105221538.26daeb0d>
