Array indices and (in|ex)clusive ranges

Bill Baxter wbaxter at gmail.com
Wed Jul 8 13:38:10 PDT 2009


On Wed, Jul 8, 2009 at 10:48 AM, Michiel
Helvensteijn<m.helvensteijn.remove at gmail.com> wrote:
> I've been reading the "Case Range Statement" topic with some interest.
>
> It has occurred to me that all those problems would be solved if array
> indices started with 1 instead of 0. Just let arrays be indexed from 1 to
> size and make the a..b syntax inclusive.
>
> I'll be expecting this change to be put in D forthwith. ;-)
>
> No, but seriously. Complete loss of backwards compatibility aside, wouldn't
> this change solve the range problem to everyones satisfaction? Like, in
> theory?

I think the answer is "no".  Probably most everything to say about it
has already been said in this thread:
http://lambda-the-ultimate.org/node/1950

--bb



More information about the Digitalmars-d mailing list