On 2012-02-27 21.45, Ted Unangst wrote:
> On Mon, Feb 27, 2012, Ingo Schwarze wrote:
>> The argument that "-not" is easier to type than "\!" doesn't
>> convince me at all; at best, it's a matter of taste. And even
>> if it were a bit easier, that wouldn't excuse interface bloat.
>
> It's only a little easier to type, but it is more consistent. find
> already uses -and and -or, but not & or |. Just pointing that out, I
> hardly ever even use find and don't care too much.
I use find all the time and I'd have to side with Ingo on this. Mainly
because I think it is a sound principle to avoid encouraging nonportable
programming practices whenever possible.
Historically (and even now), find used -o and -a for or and and
respectively (now there's a weird sentence to pronounce!). -or and -and
are later additions for clarity (or because the Posix people felt a need
to meddle^Wcontribute, I'm not sure).
The reason of course was that -o/-a are easy to write and didn't collide
with the shell's special characters. However, in those days, ! wasn't a
special character in most shells either, and it was chosen because it
was convenient, fits nicely into the C-esque thinking of unix and to
emphasize the fact that it's a unary operator by it being a lone '!'.
In fact, come to think of it, even nowadays in normal command line use
there's no need to escape the ! operator at all so I really don't see that
argument holding water at all.
(Well at least in ksh and csh; can't speak for the miserable abomination
of an excuse for a shell that is bash since I hardly ever use it... and it
isn't in base either.)
The bloatness argument is a minor one as far as I'm concerned, my main
issue is as I mentioned that it is wise not to unnecessarily encourage
nonportable programming practices by adding stuff without practical or
functional gain, and adding a -not operator to find would certainly do
just that.
Just my two cents (about 0,15 SEK).
Regards,
/Benny
--
internetlabbet.se / work: +46 8 551 124 80 / "Words must
Benny Lofgren / mobile: +46 70 718 11 90 / be weighed,
/ fax: +46 8 551 124 89 / not counted."
/ email: benny -at- internetlabbet.se