help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] declare -i


From: Greg Wooledge
Subject: Re: [Help-bash] declare -i
Date: Wed, 9 May 2012 15:55:34 -0400
User-agent: Mutt/1.4.2.3i

On Wed, May 09, 2012 at 02:49:15PM -0500, address@hidden wrote:
> So for the totally ignorant are y'all trying to say that 'declare -i' is 
> evil and should never be used

I think some of the people in this thread are trying to chase down some
weird esoteric glitch in the behavior which varies depending on whether
you say

declare -i -a foo=(bar)

or

declare -i -a foo; foo=(bar)

But they didn't say that up front, of course.

I'm more of a realist.  I don't like to get into arguments about what
the shell should or should not be doing.  I just observe what it *does*,
and then figure out what I should write or not write to make my code
(a) work, and (b) not confuse the hell out of myself and others.

So from my point of view, there's really no merit in using -i.  All it
does is add confusion, without adding any functionality to the shell.
But this is just one person's opinion.



reply via email to

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