December 17, 2019 Array notation in debugger for VisualD | ||||
---|---|---|---|---|
| ||||
Usually length is given for dynamic arrays that wastes visual space. The type of given. For static arrays it looks like int[34] while for dynamic arrays it is int[] and the length=34 is added. Why not just put the length in like static arrays? It's much more concise and gives more room for important information. data {length=20} [, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] int[] can just become data [, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] int[20] If you want to make it look different from static then write it as int[_20_] or int[=20=] or int[`20`] or .... it saves at least 11 characters that can be used to show more elements and doesn't clutter up the values list with a lot of lengths. |
February 23, 2020 Re: Array notation in debugger for VisualD | ||||
---|---|---|---|---|
| ||||
Posted in reply to AlphaPurned |
On 17/12/2019 08:40, AlphaPurned wrote:
> Usually length is given for dynamic arrays that wastes visual space. The type of given. For static arrays it looks like int[34] while for dynamic arrays it is int[] and the length=34 is added. Why not just put the length in like static arrays? It's much more concise and gives more room for important information.
>
> data {length=20} [, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] int[]
>
> can just become
>
> data [, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] int[20]
>
> If you want to make it look different from static then write it as
>
> int[_20_] or int[=20=] or int[`20`] or ....
>
>
> it saves at least 11 characters that can be used to show more elements and doesn't clutter up the values list with a lot of lengths.
>
I have added an option to move the {length=nn} display into the type field.
|
Copyright © 1999-2021 by the D Language Foundation