[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot declare local variables if they're readonly

From: Chet Ramey
Subject: Re: cannot declare local variables if they're readonly
Date: Tue, 28 Jul 2015 14:18:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 7/23/15 6:52 PM, isabella parakiss wrote:

> No.  Don't minimize this, it's not only about BASH_REMATCH.

OK.  You did, however, spend an entire message on it.

> The fact that a certain special variable is readonly for no real reason
> doesn't change this absurd nonsense about any other global variable.

Here's the thing: readonly is a rarely-used feature compared to most
others.  There are not a lot of readonly variables, and I'm asserting
that script authors mark variables as readonly for a reason.  It's
worthwhile to figure out why a variable is readonly and see if you're
circumventing the author's intent by shadowing it.  In the case of
BASH_REMATCH, I explained why it is readonly.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]