Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cca!g-rh From: g-rh@cca.CCA.COM (Richard Harter) Newsgroups: comp.os.misc,comp.unix.wizards Subject: Re: Command interfaces Message-ID: <22244@cca.CCA.COM> Date: Tue, 8-Dec-87 22:02:23 EST Article-I.D.: cca.22244 Posted: Tue Dec 8 22:02:23 1987 Date-Received: Sun, 13-Dec-87 16:40:23 EST References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <5565@oberon.USC.EDU> <9679@mimsy.UUCP> Reply-To: g-rh@CCA.CCA.COM.UUCP (Richard Harter) Organization: Computer Corp. of America, Cambridge, MA Lines: 45 Xref: mnetor comp.os.misc:340 comp.unix.wizards:5929 In article <9679@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: > >`sh' is a programming language, and can be shown to be Turing >equivalent (proof by vigourous handwaving), so unless the Pr1me >CLI can also be shown to be Turing equivalent, the Unix shell >interface is more powerful. > Although I have much respect for Chris, this is rather wide of the mark. It takes very little to be Turing equivalent; CLI is also Turing equivalent (proof by more vigorous handwaving). More to the point in discussing languages are the classes of tasks that can be programmed readily in a language. The claim at hand is that CLI is more powerful and expressive that sh, i.e. the class of tasks that it can handle easily and economicly is greater. Having worked with both (and not being willing to claim expertise in either) I will only say that this is not immediately obvious to me. Each strikes me as being baroque in its own fashion. > >This sort of thing, like the `rename *.bar .baz' that others are >so proud of :-) , seems to be desired only rarely; in such cases, >shell `for' loops, or programs like one posted sometime last year[1], >do the trick quite easily. > 'seems to desired only rarely' is a red flag. Within a particular language one very tends to do that which can be done easily within the language. For example, FORTRAN has no natural mechanism for recursion. One can do recursion in FORTRAN, albeit painfully. Is it any surprise that FORTRAN programmers rarely find a need for recursion? The same holds true of command languages as well -- if a particular approach cannot be implemented readily in a command language, then it won't be used. It does seem to me that command languages (shell languages) are an area that needs more work. Perhaps some one is doing this work, but I haven't seen it. -- In the fields of Hell where the grass grows high Are the graves of dreams allowed to die. Richard Harter, SMDS Inc.