zsh-users
 help / color / mirror / code / Atom feed
* foo=($bar) vs foo=("$bar[@]")
@ 1997-01-29  5:07 Roderick Schertler
  1997-01-29  8:14 ` Peter Stephenson
  1997-01-29 15:17 ` Zefram
  0 siblings, 2 replies; 4+ messages in thread
From: Roderick Schertler @ 1997-01-29  5:07 UTC (permalink / raw)
  To: zsh-users

The NEWS file says

    foo=$bar no longer creates an array even if bar is an array.  Use
    foo=( $bar ) or even better, foo=( "$bar[@]" ) instead.

In what way is "$bar[@]" better than $bar?  The extra line noise is a
point in favor of the simpler form, what benefit outweighs it?

I hope it's not just that it makes ksh programmers feel at home!  Being
able to say just $bar is one of zsh's big advantages in array handling.

-- 
Roderick Schertler
roderick@gate.net


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-01-29 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-29  5:07 foo=($bar) vs foo=("$bar[@]") Roderick Schertler
1997-01-29  8:14 ` Peter Stephenson
1997-01-29 15:17 ` Zefram
1997-01-29 15:45   ` Roderick Schertler

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).