Visual D Debugger long array expansion indexing fix

Rainer Schuetze r.sagitario at gmx.de
Fri Sep 20 07:27:51 UTC 2019



On 17/09/2019 22:04, Brett wrote:
> On Tuesday, 17 September 2019 at 17:19:22 UTC, Brett wrote:
>> On Tuesday, 17 September 2019 at 13:48:33 UTC, Brett wrote:
>>> does things like [1000...2000]
>>>
>>> but then lists the values as [0], [1], ...
>>>
>>> Could it use the absolute values [1000], [1001], etc?
>>>
>>> That way one doesn't have to do mental arithmetic?
>>>
>>> Obviously not difficult but I see no reason to not do it.

The nice thing about the current implementation is that there is no
extra state but the expression to be passed around by the evaluation
(a[1001] == a[1000..2000][1]), but I agree that it is a bit confusing.
Maybe there is some other solution...

>>
>> Also, can AA arrays have their keys sorted? Lexicographical should
>> work. I see no reason not to sort them, specially when the keys are
>> integers, helps locate values in large arrays much easier.

This can be a bit expensive for large arrays as all elements need to be
read and cached before displaying the first. This is usually done
incrementally by the debugger.

> 
> And maybe add a linear index on AA's so it is easier to locate
> values(and/or show length).
> 

This would be easier, but probably not so interesting if not also sorted.


More information about the Digitalmars-d-debugger mailing list