correct • elegant • free

△ △

◅ Force use of sh

ftp - mkdir using environment variables ▻

Force use of sh

In article <7so7uf$gf0$>,
Donn Cave  <> wrote:
>The two quirks (in my opinion) it introduced:
>1. All variables go into the environment.

I'm considering a fix for this in rc-2.0.

>2. Vector products, whatever they call it, where the juxtaposition of
>   two arrays  (a b c)(x y z)  evaluates to (ax by cz).  It's an
>   interesting feature, and although it's hard for me to find any
>   practical use for it, that wouldn't be a problem if it were done
>   only as called for explicitly (with "^").

I also have a plan to make free carets optional, but you don't get a
free caret in a literal `(a b c)(x y z)'.

If you're using rc, and are interested in discussing these developments,
you should be on the rc list: <>.

>usually more important, in my opinion, is the streamlined conceptual
>approach and the uncluttered notation.

To give one example, rc has exactly one form of quoting.  By comparison,
sh has at least 3, and languages like Perl even more.  A concatenation
operator, `^', makes sh-like double quotes and backwhacks unnecessary.

    ; foo = bar
    ; printf %s\n $foo
    ; printf %s\n '$foo is ' ^ $foo
    $foo is bar
    ; printf %s\n 'He said, "what''s the plan?"'
    He said, "what's the plan?"
    ; printf %s\n '$foo is `' ^ $foo ^ ''''
    $foo is `bar'

I find all this less surprising, and much easier to remember accurately,
than the quoting rules of any other shell.

Tim Goodwin   | "[ `static' ] is so overloaded in the C/C++ world that
Leicester, UK | I try to avoid it whenever I can't." -- Larry Wall

Original headers:

From: (Tim Goodwin)
Subject: Re: Force use of sh
Date: 28 Sep 1999 11:23:55 +0100
Organization: University of Leicester, UK
Message-ID: <7sq50h$tbc$>
References: <7so2m2$>
  <7sef4d$8g0$> <7snmbq$f2a$>

△ △

◅ Force use of sh

ftp - mkdir using environment variables ▻