zsh-users
 help / color / mirror / code / Atom feed
From: Roderick Schertler <roderick@gate.net>
To: zsh-users@math.gatech.edu
Subject: foo=($bar) vs foo=("$bar[@]")
Date: Wed, 29 Jan 1997 00:07:32 -0500	[thread overview]
Message-ID: <27155.854514452@eeyore.ibcinc.com> (raw)

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


             reply	other threads:[~1997-01-29  5:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-29  5:07 Roderick Schertler [this message]
1997-01-29  8:14 ` Peter Stephenson
1997-01-29 15:17 ` Zefram
1997-01-29 15:45   ` Roderick Schertler

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=27155.854514452@eeyore.ibcinc.com \
    --to=roderick@gate.net \
    --cc=zsh-users@math.gatech.edu \
    /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.
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).