Excerpts from Mike Frysinger's message of Thu Oct 14 00:32:40 +0200 2010:
> On Wednesday, October 13, 2010 18:13:18 Amadeusz Żołnowski wrote:
> > Excerpts from Mike Frysinger's message of Wed Oct 13 23:46:43 +0200 2010:
> > > On Wednesday, October 13, 2010 15:57:17 Amadeusz Żołnowski wrote:
> > > > And why putting different tasks into one function?
> > >
> > > for the same reason we dont have separate test binaries: test_exist,
> > > test_file, test_dir, etc...
> > >
> > > it makes more sense in my mind to combine the functionality.
> >
> > So the only argument for having more complicated, less intuitive and
> > less readable function is the old 'test' program? Please, reconsider my
> > solution with more reason.
>
> we prioritize differently. i prefer unified code with options.
In which part it's unified? As I said it doesn't conform much to 'test'
convention.
> you preferred unrolled duplicated code.
What I'm duplicating? Lines "local f", "for f; do" or "}"? And what's
bad about it while still having less LOC?
> > Moreover we're using 'test' as '[[ … ]]' which changes much in readability.
>
> what are you talking about ? no one is using `test` in their code and if they
> are, their code is broken. none of the stuff ive posted is running `test`.
I've messed up with that paragraph. The point was that "path_exists -a"
is even less readable than "test -e something". As you've said you
wouldn't use "test -e" syntax instead of "[[ -e ]]", but let's skip that
part…
--
Amadeusz Żołnowski
PGP key fpr: C700 CEDE 0C18 212E 49DA 4653 F013 4531 E1DB FAB5
|