From: giacomo@tesio.it (Giacomo Tesio)
Subject: [9fans] Why Plan 9 uses $ifs instead of $IFS?
Date: Tue, 17 Oct 2017 17:45:39 +0200 [thread overview]
Message-ID: <CAHL7psGouHx9xSbNOzG8bknTySHrQB7QoM2hrnxvmer6PYEu0A@mail.gmail.com> (raw)
In-Reply-To: <CAOw7k5icBw0zg-PdQj+O1YfRL25Y5V73m1d1N1vJS-a5kC=X5g@mail.gmail.com>
>
> In *rc* you use quotation marks when you want a syntax character to
> appear in an argument, or an argument that is the empty string, and at no
> other time. IFS is no longer used, *except in the one case where it was
> indispensable*: converting command output into argument lists during
> command substitution.
So, I undestood: it used to use IFS in that one case.
I got it now: the fact that IFS was named ifs was not a relevant for the
discourse, and thus omitted.
Still I'm a bit surprised that such change in the conventions provides no
practical advantage: the taste changes with age, but costs accumulate... :-)
BTW, thanks for your answers!
Giacomo
2017-10-17 17:18 GMT+02:00 Charles Forsyth <charles.forsyth at gmail.com>:
> since for example the original Rc paper still referred to $IFS.
>
>
> really? the only references to IFS I can find are in comparisons of $ifs
> to the Bourne shell's $IFS
>
> On 17 October 2017 at 16:05, Giacomo Tesio <giacomo at tesio.it> wrote:
>
>> Really? Just aesthetics? :-o
>> I supposed it had some practical goal I was missing, since for example
>> the original Rc paper still referred to $IFS.
>>
>> This would flips the question a bit: I wonder why the same designers
>> chose uppercase variable names while designing Unix... :-)
>>
>>
>> Giacomo
>>
>> 2017-10-17 16:39 GMT+02:00 Dan Cross <crossd at gmail.com>:
>>
>>> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo at tesio.it>
>>> wrote:
>>> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
>>> > variables over uppercase ones?
>>> >
>>> > At first, given the different conventions between rc and sh (eg $path
>>> is an
>>> > array, while $PATH is a string), I supposed Plan 9 designers wanted to
>>> > prevent conflict with unix tools relying to the older conventions.
>>> >
>>> > However, I'm not sure this was the main reason, as this also open to
>>> subtle
>>> > issues: if a unix shell modifies $IFS and then invoke an rc script,
>>> such
>>> > script will ignore the change and keep using the previous $ifs.
>>> >
>>> >
>>> > As far as I can see, APE does not attempt any translation between the
>>> two
>>> > conventions, so maybe I'm just missing something obvious...
>>> >
>>> >
>>> > Do anyone know what considerations led to such design decision?
>>>
>>> Aesthetics.
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20171017/5316f142/attachment-0001.html>
next prev parent reply other threads:[~2017-10-17 15:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 14:38 Giacomo Tesio
2017-10-17 14:39 ` Dan Cross
2017-10-17 15:05 ` Giacomo Tesio
2017-10-17 15:18 ` Charles Forsyth
2017-10-17 15:45 ` Giacomo Tesio [this message]
2017-10-17 16:04 ` Giacomo Tesio
2017-10-17 17:35 ` Dan Cross
2017-10-17 22:32 ` Tiago Natel
2017-10-17 16:00 ` Skip Tavakkolian
2017-10-17 16:22 ` Giacomo Tesio
2017-10-17 15:46 ` Teodoro Santoni
2017-10-17 18:28 ` Anthony Martin
2017-10-17 21:12 ` Jules Merit
2017-10-17 21:45 ` Jules Merit
2017-10-17 21:49 ` Jules Merit
2017-10-17 22:18 ` Charles Forsyth
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=CAHL7psGouHx9xSbNOzG8bknTySHrQB7QoM2hrnxvmer6PYEu0A@mail.gmail.com \
--to=giacomo@tesio.it \
/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).