[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
use of sugar
Some folks have said, just put in the function and don't waste sugar. I
can sympathize, and am even willing to do without <>> for rw+append. I do
want to point out that <> "isn't just for sh compatibility anymore". It is
now part of the posix sh spec, and you're going to start seeing it on
your commercial unix systems from now on.
I was 1/2 serious when i said, "maybe it was never used because it was
never in the shell." The old "if all you have is a hammer everything looks
like a nail."
I long ago worked on a unix-style system that defined 3 standard inputs,
3 standard outputs, and I think even 3 standard errors, and the shell had
a fairly elegant syntax for building non-linear pipelines. Only VERY recently
is that even possible in unix with things like
diff <{pipe1} <{pipe2}
and that's a bit of a hack. In the aforementioned system, if diff was called
with no arguemnts, it just read stdin1 and stdin2.
The point is that Unix (and even Plan 9) has unnecessarily limited the
expressiveness and power of the tools by restricting itself to only one
stdin and stdout - even if today we had a shell for elegantly building
non-linear pipelines, NONE of the utilities could take advantage of it!
The same thing with <>. Since you couldn't do it, no-one did it and now
no-one feels it's necessary. (Yeah, I know, someone's going to say, "it must
really not have been necessary since no syntax was provided".)
Pardon the soap-boxing.
Arnold