Array indices and (in|ex)clusive ranges

dsimcha dsimcha at yahoo.com
Wed Jul 8 14:04:02 PDT 2009


== Quote from Michiel Helvensteijn (m.helvensteijn.remove at gmail.com)'s article
> 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've suggested 0.5 as a compromise in the past (ok I haven't but that's beside the
point).  I feel that this suggestion was dismissed without fair consideration.



More information about the Digitalmars-d mailing list