RE: 0-based Indexing

new topic     » goto parent     » topic index » view thread      » older message » newer message

Most versions of APL have an option: 0 or 1 indexing. Pascal can have any
index origin you want.
The fact is that some operations are easier (for humans) with 0 indexing,
other with 1 indexing, and still other with some arbitrary index origin.
Regards.-
----- Original Message -----
From: C. K. Lester <cklester at yahoo.com>
Subject: Re: 0-based Indexing


>
>
> Derek splained (snippage occurred):
>
> > > I don't get it. Why do some languages use 0-based indexing? It's got
to
> be
> > > the dumbest thing in programming language history. Or maybe not.
> > >
> > The index is actually an offset from an address.
>
> Okay, I get that... and that's reasonable for the behind-the-scenes data
> manipulation, but why not hide that detail and use 1-based indexing? Is it
> that much of a performance issue? Like Greg said, 1-based indexing is more
> intuitive, easier to read and understand...
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu