From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from oldp.astro.wisc.edu ([128.104.39.15]) by hawkwind.utcs.toronto.edu with SMTP id <2230>; Tue, 25 May 1993 17:29:17 -0400 Received: by oldp.astro.wisc.edu (5.65/DEC-Ultrix/4.3) id AA29703; Tue, 25 May 1993 16:29:11 -0500 Message-Id: <9305252129.AA29703@oldp.astro.wisc.edu> To: rc@hawkwind.utcs.toronto.edu Subject: Re: wishlist Date: Tue, 25 May 1993 17:29:10 -0400 From: Alan Watson X-Mts: smtp John writes: > Why are people looking for features to throw out of rc, anyway? I'm English, so I like whining; an Australian should understand that. > There are still some of us -- probably everyone on this list -- who believe > that software bloat is bad, and that smaller, faster code is better. Yes, but man page bloat is worse. So, let me defend some of my statements: (a) Here strings. If echo is a built-in, here strings are redundant with echo and pipes (more on why I think echo should be a built-in later). Will anyone argue with me that a redundant feature WHICH USERS NEVER USE DIRECTLY should leave the language? The only caveat is if the code to re-write functions in terms of echo and pipes is more likely to be a problem to maintain than the current code, and if Byron feels he has better things to do with his time (and he almost certainly does). (b) `` > Its convenience certainly justifies its redundancy many times > over. It must stay. I will accept an argument of convenience if you calculate the factional occurance of `` in your history file, and if that faction is larger than, say, 0.5%. Typing convenience just doesn't wash in scripts. Two ways to do one thing is bad, bad, bad. Really sinful. We should either junk `` or ifs, and since the later comes handed down from the heavens, the former must go. (c) newpgrp Perhaps I'm speaking from ignorance here, but what about a stand-alone binary along the lines of nice, nohup, et al? If people really want it built-in, then they can hack addon.h. (d) $^foo Oops, Malte shows me up. Same arguments as (b). As I've mentioned in private email to Byron, I'm not going to stop using rc just because these feature remain. But my honest opinion is that if the time Byron had to devote to rc was limitless, they should be purged. I'm sure he has better things to do, though. Now, the big one, why should echo (and read) be built-in? If all a shell does is fork and exec commands, they need not be there. However, I would like to be able to use rc in the same manner as `awk' -- read some data, match on it using ~, mess with it with some external programs, and spit it out the other end. awk is great for some stuff, but it has it's limitations. For example, I want be be able to parse mail folders in rc. To do this efficiently in rc, I need echo and read to be built-in. (This was never done very much in sh because quoting becomes a nightmare.) Perhaps this is misguided, but it seems a modest investment (two primitives, both with historical precedent) for a vast increase in rc's potential. If echo becomes a de jure built-in, rather than remaining de facto, you can still use "fn echo { /bin/echo $* }".