Array Lower Bounds
daniel.keep.lists at gmail.com
Tue Dec 18 17:05:19 PST 2007
Jarrett Billingsley wrote:
> "Mike Marquard" <mike_marquard at hotmail.com> wrote in message
> news:fk7r0c$n3q$1 at digitalmars.com...
>> Thanks for the answer Bill. That's too bad, I would think that something
>> like that would be fairly easy to implement in the language and would
>> certainly be usefull.
>> I've never used fortran but I think it does have that feature and I think
>> just about every language that came before c became popular had that
> What things are better with arbitrary-lower-bound arrays? I honestly can't
> think of a time where I was like "damn! I wish I could start this array at
> 17!" or something.
Why would you want to start an array at 355,687,428,096,000?!
Seriously, though, it can be a bit of a pain translating math stuff
(which all uses 1-based indices) into C or D which is all 0-based.
That said, I've used this feature in Visual Basic, and it left a very
bad taste in my mouth. It really does make it easier to write, but an
immense pain in the arse to work out if the code's actually working when
you read it again.
When they designed VB.NET, I believe the consensus was "this is a really
stupid idea" and they excised it.
More information about the Digitalmars-d-learn