On 11/21/14 4:43 PM, Greg Wooledge wrote:

> OK, right off the bat, you are using an undocumented HACK:
> 
> function filter {
>       local REF="$1[@]" X 
> 
> I don't remember whether we ever got official word from Chet on whether
> this syntax would continue to be supported in the future.  It seems to
> me more of an accidental misfeature that people have latched onto because
> there is no other way to get things done.  (Besides eval.)
> 
> The fact that one must use this undocumented hack (which may or may not
> magically vanish the next time Chet tightens up the grammar) in order
> to retrieve values from an array whose name is passed as an argument is
> already one strike against it.

Wow, that's a pretty tendentious argument.  That syntax has been accepted
since I implemented arrays, ksh93 and other shells that implement arrays
accept it, I explicitly made it supported for compatibility, and I
recommended its use earlier this week.  I don't think it will be going
away.

(And it has nothing to do with the shell grammar.)

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

Reply via email to