httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ics.uci.edu>
Subject Re: cvs commit: apache-devsite how-to-release.html
Date Sat, 23 Aug 1997 00:42:10 GMT
>> For the same reason that it took so long for us to get the Apache
>> buffering code right.  If there is a simpler/faster/more-often-tested
>> solution available, use it.  Unix pipes are great, but why use them when
>> you don't need to?
>
>Why don't use them when we are able to use them?

I am able to use a lot of things, but that doesn't mean I should use them.
If I took that attitude, I'd never be able to finish a Perl program.

To be more concrete, you had

   find . -name ".cvsignore" -print | xargs rm

and I replaced it with

   find . -name ".cvsignore" -exec rm {} \;

The first finds the files and prints their pathname, which is piped to
the xargs command which reads the pathname list and constructs an exec
call on rm.  The second finds the files and execs rm on each one found.
Since removing files is one of the primary reasons find exists, this is
a reliable command, and is simpler than piping the names to another
program just to accomplish the same exact purpose.

>Just a simple question, Roy: Have you ever read ``The UNIX Philosophy'' by
>Mike Gancarz (ISBN 1-55558-123-4)?  If yes, I'm really fascinated about your
>personal opinion on Unix pipes... ;_)

No, just 14 years experience programming on and administering Unix systems.
I know the advantages of pipeline architectures for separation of concerns
and program simplicity.  OTOH, I also have good intuition in regards to
how programmers think and test.  Using a pipe does not make the program
simpler if you can do the same task without using any other program than
the one at the head of the pipe.

....Roy

Mime
View raw message