From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19121 invoked from network); 23 Sep 2009 17:04:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 23 Sep 2009 17:04:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 57273 invoked from network); 23 Sep 2009 17:04:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Sep 2009 17:04:10 -0000 Received: (qmail 7008 invoked by alias); 23 Sep 2009 17:04:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27289 Received: (qmail 6999 invoked from network); 23 Sep 2009 17:04:07 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 23 Sep 2009 17:04:07 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id CADDC804CE03 for ; Wed, 23 Sep 2009 19:04:01 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly07d.srv.mailcontrol.com (MailControl) with ESMTP id n8NH3x2H003142 for ; Wed, 23 Sep 2009 18:03:59 +0100 Received: from news01.csr.com ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 23 Sep 2009 18:03:55 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id n8NH3t5j031334 for ; Wed, 23 Sep 2009 18:03:55 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id n8NH3sQ3031330 for ; Wed, 23 Sep 2009 18:03:54 +0100 Message-Id: <200909231703.n8NH3sQ3031330@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Zsh list Subject: Re: zero- vs one- based array indexing? In-reply-to: <19130.20939.395217.755549@gargle.gargle.HOWL> References: <19130.20939.395217.755549@gargle.gargle.HOWL> Comments: In-reply-to Greg Klanderman message dated "Wed, 23 Sep 2009 12:50:19 -0400." Date: Wed, 23 Sep 2009 18:03:53 +0100 From: Peter Stephenson X-OriginalArrivalTime: 23 Sep 2009 17:03:55.0596 (UTC) FILETIME=[D59700C0:01CA3C6F] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-06-00-00 (www.mailcontrol.com) on 10.68.0.117 X-Virus-Scanned: ClamAV 0.94.2/9827/Wed Sep 23 15:12:45 2009 on bifrost X-Virus-Status: Clean Greg Klanderman wrote: > Can someone give me a quick history of why zsh defaults to one-based > array indexing? Bash and ksh appear to use zero-based indexing, and > probably most CS types prefer that too. Basically from csh, I think. Arrays were a bit of an afterthought in earlier Bourne-style shells, so zsh didn't take much notice. > Would it be OK to add an > option to control just zero-based arrays separately from the other > changes KSHARRAYS brings? It's far too late for this. Encouraging people to use anything other than native zsh or ksh emulation would be a disaster, multiplying our problems yet more and solving nothing. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom