Path: utzoo!utgpu!news-server.csri.toronto.edu!utcs.toronto.edu!cks Newsgroups: comp.arch From: cks@hawkwind.utcs.toronto.edu (Chris Siebenmann) Subject: Re: Globbing Message-ID: <1991Feb28.225426.24072@jarvis.csri.toronto.edu> Organization: Ziebmef home away from home References: <1991Feb18.152347.28521@dgbt.doc.ca> <474@bria> <19217@cbmvax.commodore.com> <5573:Feb2307:19:4491@kramden.acf.nyu.edu> <19336@cbmvax.commodore.com> <43994@cos.com> Distribution: na Date: 1 Mar 91 03:54:27 GMT Lines: 36 fetter@cos.UUCP (Bob Fetter) writes: [...] | Me, I think it is appropriate to have executables perform globbing. | It eliminates the bull$hit of quoting and keeps semantics from being | drowned in syntax. Actually, all the quoting bullshit is still there, just in a more rarely needed context where its very infrequency increases the danger of someone forgetting about the need for it. This is because you still need to be able to do have programs (like rm and mv, or their equivalents) work on files with globbing characters in their names. You also have to stick this quoting logic into anything that spits out filenames that are going to be handed to other programs; consider "find / -exec operate {} \;" or its equivalent. Becuase it's hidden and rare, this is a much worse beartrap than ordinary quoting in the shell; quoting in the shell happens once, in one place, and Unix application writers know that if they don't use the shell, they're safe. Moving it into Unix-like applications leaves the application writer and invocer with another worry, and some very hard decisions. For example: in such a system, should find's -print option quote the resulted output appropriately, and should xargs quote the input arguments? Better make sure both agree. My general observation is that quoting is a hard problem, and that the fewer things you have to quote and in the fewer places, the better. For all its worts, the Unix shell (and especially rc, the Plan 9/V10 shell) have simple globbing quoting that you only have to do rarely. -- "Emacs itself was one of about half-a-dozen dispatch-vector-driven editors developed circa 1971-1972, and is known to the world at large primarily because it absorbed the functionality of all the others before one of them could successfully absorb it. Emacs has been much like an amoeba from the very beginning." - Lum Johnson cks@hawkwind.utcs.toronto.edu ...!{utgpu,utzoo,watmath}!utgpu!cks