why $ is need to access array [negative index]?

mw mingwu at gmail.com
Fri Sep 18 20:47:46 UTC 2020

On Friday, 18 September 2020 at 20:08:36 UTC, IGotD- wrote:
> Array indexes in D are using unsigned integers so negative 
> numbers don't exist. What you are suggesting isn't possible in

This is the *consequence* of current design.

We are talking about change the design here.

> D. $ is the length of the array so $-1 is correct in this 
> regard and produces a correct positive number given that it is 
> inside the array bounds.

More information about the Digitalmars-d mailing list