zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: Zsh list <zsh-workers@sunsite.dk>
Subject: Re: zero- vs one- based array indexing?
Date: Wed, 23 Sep 2009 18:03:53 +0100	[thread overview]
Message-ID: <200909231703.n8NH3sQ3031330@news01.csr.com> (raw)
In-Reply-To: <19130.20939.395217.755549@gargle.gargle.HOWL>

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 <pws@csr.com>            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


      reply	other threads:[~2009-09-23 17:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 16:50 Greg Klanderman
2009-09-23 17:03 ` Peter Stephenson [this message]

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=200909231703.n8NH3sQ3031330@news01.csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /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).