On Wed, Jun 7, 2017 at 8:56 AM, shawn wilson <ag4ve.us(a)gmail.com> wrote:
I learned the other day that array indexes in some
languages start at 1
instead of 0. This seems to be an old trend that changed around the 70s?
Who started this? Why was the change made?
Tastes Change -- but I really think its more "things happen" is the short
answer.
The longer answer really comes from what you were comfortable. As has
been pointed at the 'engineers' and US types that grew up in the world of
Fortran and Basic in the 50s, and 60s had used 1. Which made perfect
sense for them. Certainly has my father was taught and how he taught me
in the sixties. However, the 'formal' mathematician and Europeans types
from the Algol world tended to think 'normal' in terms of counting from 0
like the HW did during the same time period.
By the late 60s, early 70th, as has been pointed out, some languages
started to offer some choice. I remember different professors at CMU
having different views what was better - and clearly it was a matter of
taste. But most took a view of what was most important was to keep *to
local custom and convention *as the SW engineering rule* of 'least
amazement' *needed to be high bit.
I think the more interesting note is that Ken has gone on record to state
he set out to create a Fortran compiler when he created B. So it is an
interesting question of why B (and C) ended up with the BCPL (Algol)
convention of 0 based addresses not the Fortran 1 based? But I actually
think the 'zero-ness' of today, we have is less to do with
'Algol-like'
(Pascal et al) winning and being 'better' than it was that C ended up as
the dominant language and for whatever reason Ken picked zero based
addressing - probably >>I'll guess<< because he was staying close to the
HW.
Clem