From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: Noob question: why sequences, lists in particular start at index 0 in Elisp?
Date: Sun, 08 Nov 2020 09:42:42 -0500 [thread overview]
Message-ID: <jwvlffb52uj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <VI1PR06MB4526D9259AFBC8E9C71D211396EB0@VI1PR06MB4526.eurprd06.prod.outlook.com> (Arthur Miller's message of "Sun, 08 Nov 2020 14:32:08 +0100")
> I understand why they do so in C; but why in Elisp?
Why should it be different in ELisp?
AFAIK, indexing should always be 0-based, so we don't get into silly "is
1900 in the 19th century or the 20th century". And indeed computer
science got this mostly right, except for Fortran arrays and
Emacs buffers.
Stefan
next prev parent reply other threads:[~2020-11-08 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 13:32 Noob question: why sequences, lists in particular start at index 0 in Elisp? Arthur Miller
2020-11-08 14:42 ` Stefan Monnier [this message]
2020-11-08 16:04 ` Arthur Miller
2020-11-08 16:16 ` Eli Zaretskii
2020-11-08 15:42 ` Philipp Stephani
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=jwvlffb52uj.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=arthur.miller@live.com \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.