rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Alan Watson <alan@oldp.astro.wisc.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: wishlist
Date: Tue, 25 May 1993 17:29:10 -0400	[thread overview]
Message-ID: <9305252129.AA29703@oldp.astro.wisc.edu> (raw)

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 $* }".


             reply	other threads:[~1993-05-25 21:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-25 21:29 Alan Watson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-26 17:49 wishlist Tom Culliton x2278
1993-05-26 17:29 wishlist Alan Watson
1993-05-26 17:26 wishlist Alan Watson
1993-05-26 16:59 wishlist Tom Culliton x2278
1993-05-26  6:57 wishlist Bengt KLEBERG
1993-05-26 17:51 ` wishlist Chris Siebenmann
1993-05-26 19:04 ` wishlist mycroft
1993-05-26  3:08 wishlist Alan Watson
1993-05-26  3:02 wishlist Byron Rakitzis
1993-05-26  3:06 ` wishlist Scott Schwartz
1993-05-25 23:58 wishlist Tom Culliton x2278
     [not found] <alan@oldp.astro.wisc.edu>
1993-05-25  6:55 ` wishlist malte
1993-05-25  9:16   ` wishlist John Mackin
1993-05-25  1:43 wishlist Alan Watson
1993-05-24 16:13 wishlist Erik Quanstrom
1993-05-24 15:17 wishlist Tom Culliton x2278
1993-05-22  0:43 wishlist Scott Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9305252129.AA29703@oldp.astro.wisc.edu \
    --to=alan@oldp.astro.wisc.edu \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).