From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Il5D1-0002QJ-1M for garchives@archives.gentoo.org; Thu, 25 Oct 2007 16:05:23 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9PG4Hrw009218; Thu, 25 Oct 2007 16:04:17 GMT Received: from pollux.sshunet.nl (pollux.sshunet.nl [145.97.192.42]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9PG1Wxg005004 for ; Thu, 25 Oct 2007 16:01:32 GMT Received: from localhost (localhost.localdomain [127.0.0.1]) by pollux.sshunet.nl (Postfix) with ESMTP id EDD6258001E for ; Thu, 25 Oct 2007 18:01:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at pollux.warande.net Received: from pollux.sshunet.nl ([127.0.0.1]) by localhost (pollux.sshunet.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VtZfJH72SMFb for ; Thu, 25 Oct 2007 18:01:31 +0200 (CEST) Received: from [145.97.223.86] (86pc223.sshunet.nl [145.97.223.86]) by pollux.sshunet.nl (Postfix) with ESMTP for ; Thu, 25 Oct 2007 18:01:31 +0200 (CEST) Message-ID: <4720BE02.6080409@gentoo.org> Date: Thu, 25 Oct 2007 18:02:10 +0200 From: "Marijn Schouten (hkBst)" User-Agent: Thunderbird 2.0.0.6 (X11/20070802) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Opinions Wanted - Arrays again :) References: <1193326831.4245.16.camel@uberlaptop.marples.name> In-Reply-To: <1193326831.4245.16.camel@uberlaptop.marples.name> X-Enigmail-Version: 0.95.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 0e72e12f-43db-4559-a99d-41e57fe86510 X-Archives-Hash: 986d6a21dc24ce8f9e36ed6cf8c2249f -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roy Marples wrote: > Hello List > > It's your favourite posix shell lover here, asking for your honest > opinions. > > array="1.2.3.4 netmask 5.6.7.8; > \* > 'host.name' netmask 1.2.3.4 > -I 'option; $FOO with spaces' > " > > array=("1.2.3.4 netmask 5.6.7.8;" > "\*" > "'host.name' netmask 1.2.3.4" > "-I 'option; $FOO with spaces'" > ) > > array="'1.2.3.4 netmask 5.6.7.8;' \ > '\*' \ > \"'host.name' netmask 1.2.3.4\" \ > \"-I 'option; $FOO with spaces'\" > " > > The first and last are of course posix constructs whilst the middle is > bash. > > The bash one is purely there for reference, and of course you can still > use it if /bin/sh is bash. The last one is what baselayout-2 currently > uses and I'm wondering if we should switch to the first one before we > come out of package.mask. > > I'm asking which you think are the most readable of the first and last > ones and if you see any issues with either. These sh ``arrays'' are really just strings, right? Did you implement functions to take them apart? Can the same function handle forms 1 and 3? Marijn - -- Marijn Schouten (hkBst), Gentoo Lisp project , #gentoo-lisp on FreeNode -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHIL4Bp/VmCx0OL2wRAszVAJ9gKSxDq+D4QlppCw+vHzKtCTq5DQCfUa0m lxNxzVbipBXBcPL+6G2vGyY= =bBAt -----END PGP SIGNATURE----- -- gentoo-dev@gentoo.org mailing list