Multiple executables in path (Was: NON-SOURCE POSTINGS CONSIDERED HARMFUL!)

Tom Christiansen tchrist at convex.COM
Fri Jan 25 19:01:51 AEST 1991


>From the keyboard of brnstnd at kramden.acf.nyu.edu (Dan Bernstein):
:Ya want other behaviors? Fine, ya get other behaviors. These all use the
:same strategy as the original.

[ many nice pipe examples that no novice will ever decipher. ]

:> But Tom's solution can easily be changed to have either behavior.
:
:So what? So can any reasonable solution.

And your solution, Dan, has not yet been proven to be such.  Leave the
programming langauge at sh if it will eliminate an irrevlant complaint of
yours.  The principal point is that there is a straightforward algorithm
employed here that a relatively recently initiated unix user can easily
read and understand.  To say "for each dir in path, print the pathname if
there is an exececutable file of the target name there" is much easier to
grok.  It's called top-down programming.  The tr/sed/sed/blah munging is
not as simple, and not as obvious.  In fact, it's several times less
obvious.  Take both to a novice and ask their opinion on this.  I
challenge you.

--tom
--
"Hey, did you hear Stallman has replaced /vmunix with /vmunix.el?  Now
 he can finally have the whole O/S built-in to his editor like he
 always wanted!" --me (Tom Christiansen <tchrist at convex.com>)



More information about the Alt.sources.d mailing list