Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!gatech!ulysses!ggs From: ggs@ulysses.homer.nj.att.com (Griff Smith) Newsgroups: comp.unix.wizards Subject: Re: more rm insanity (actually, parser wars) Message-ID: <3255@ulysses.homer.nj.att.com> Date: Sat, 5-Dec-87 17:37:56 EST Article-I.D.: ulysses.3255 Posted: Sat Dec 5 17:37:56 1987 Date-Received: Thu, 10-Dec-87 20:05:39 EST References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <12726@think.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 38 Summary: libraries don't always help In article <12726@think.UUCP>, barmar@think.UUCP writes: ... > >In article <337@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: > >| > >|Have you ever used TOPS-10? That was a system where globbing was done by > >|the program, not the shell. Result? No two programs had exactly the > >|same syntax for file names (some would let you quote strange characters > >|by writing octal, some wouldn't, some allowed directories, some didn't, > >|&c &c). > > If TOPS-10 doesn't provide a library that allows all commands to > operate consistently, that is a TOPS-10 problem, but don't assume that > all systems that don't expand in the shell are just like TOPS-10. > > Barry Margolin > Thinking Machines Corp. As a veteran of the TOPS-10 SCAN/WILD wars, I agree with the first complaint. When command parsing is done in the application program there is too much opportunity for "creativity". When it's done in the shell it may be less beautiful, but it's more likely to be consistent. DEC did have a library that "simplified" directory scanning ("WILD") and command arg parsing ("SCAN"). It required the user to build tables of expected arguments, default values, etc. Some people took the trouble to learn how to use it, many gave up and did their own quick and dirty versions. Among my associates it was a badge of honor to have written a few command scanners ("I'll look at yours if you'll admire mine"). The net result was confusion, just as with UNIX System commands that don't follow the conventions. On the plus side, commands that did use SCAN/WILD were much more robust than most UNIX commands; none of this crap about passing "junk" to atoi() and silently getting zero. -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: 1-201-582-7736 UUCP: {allegra|ihnp4}!ulysses!ggs Internet: ggs@ulysses.uucp