December 18, 2007
0ffh wrote:
> That means it was easy for the compiler writer to magically vanish the
> funny offsets away at compile time, which Walter won't be able to do
> with D's dynamic arrays.

Actually, come to think of it, you /could/ manipulate the pointer in
the array structure (ugly hack, but... =), if it wasn't for the GC.

regards, frank
December 19, 2007

Jarrett Billingsley wrote:
> "Mike Marquard" <mike_marquard@hotmail.com> wrote in message news:fk7r0c$n3q$1@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 feature.
> 
> 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.

<joke type="obligatory">

Why would you want to start an array at 355,687,428,096,000?!

</joke>

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.

	-- Daniel
December 19, 2007
"Daniel Keep" <daniel.keep.lists@gmail.com> wrote in message news:fk9qof$u4s$2@digitalmars.com...

> Why would you want to start an array at 355,687,428,096,000?!

For fun and profit.

> When they designed VB.NET, I believe the consensus was "this is a really stupid idea" and they excised it.

I think when they designed VB.Net, they basically said "how can we translate all the capabilities of C# into a Basic-esque syntax?"  ;)


1 2 3
Next ›   Last »